/*! For license information please see 376.js.LICENSE.txt */
(self.webpackChunkmp_webgl = self.webpackChunkmp_webgl || []).push([
  [376],
  {
    4260: function (e, t, i) {
      e.exports = (function () {
        "use strict";
        var e =
          "undefined" != typeof window
            ? window
            : void 0 !== i.g
            ? i.g
            : "undefined" != typeof self
            ? self
            : {};
        function t(e) {
          return e &&
            e.__esModule &&
            Object.prototype.hasOwnProperty.call(e, "default")
            ? e.default
            : e;
        }
        function r(e, t) {
          return e((t = { exports: {} }), t.exports), t.exports;
        }
        var n = function () {
            return (
              /Android/i.test(navigator.userAgent) ||
              /iPhone|iPad|iPod/i.test(navigator.userAgent)
            );
          },
          s = function (e, t) {
            for (var i = 0, r = e.length; i < r; i++) t[i] = e[i];
          },
          a = function (e, t) {
            for (var i in t) t.hasOwnProperty(i) && (e[i] = t[i]);
            return e;
          },
          A = t(
            r(function (t, i) {
              !(function (e, i) {
                t.exports = i();
              })(0, function () {
                var t,
                  i,
                  r,
                  n = function (e, t) {
                    if (!(e instanceof t))
                      throw new TypeError("Cannot call a class as a function");
                  },
                  s = (function () {
                    function e(e, t) {
                      for (var i = 0; i < t.length; i++) {
                        var r = t[i];
                        (r.enumerable = r.enumerable || !1),
                          (r.configurable = !0),
                          "value" in r && (r.writable = !0),
                          Object.defineProperty(e, r.key, r);
                      }
                    }
                    return function (t, i, r) {
                      return i && e(t.prototype, i), r && e(t, r), t;
                    };
                  })(),
                  a = (function () {
                    function e(e, t) {
                      var i = [],
                        r = !0,
                        n = !1,
                        s = void 0;
                      try {
                        for (
                          var a, A = e[Symbol.iterator]();
                          !(r = (a = A.next()).done) &&
                          (i.push(a.value), !t || i.length !== t);
                          r = !0
                        );
                      } catch (e) {
                        (n = !0), (s = e);
                      } finally {
                        try {
                          !r && A.return && A.return();
                        } finally {
                          if (n) throw s;
                        }
                      }
                      return i;
                    }
                    return function (t, i) {
                      if (Array.isArray(t)) return t;
                      if (Symbol.iterator in Object(t)) return e(t, i);
                      throw new TypeError(
                        "Invalid attempt to destructure non-iterable instance"
                      );
                    };
                  })(),
                  A = 0.001,
                  o = 1,
                  l = function (e, t) {
                    return "data:" + e + "," + encodeURIComponent(t);
                  },
                  c = function (e, t, i) {
                    return e + (t - e) * i;
                  },
                  h = (function () {
                    var e = /iPad|iPhone|iPod/.test(navigator.platform);
                    return function () {
                      return e;
                    };
                  })(),
                  d = (function () {
                    var e =
                      -1 !== navigator.userAgent.indexOf("Version") &&
                      -1 !== navigator.userAgent.indexOf("Android") &&
                      -1 !== navigator.userAgent.indexOf("Chrome");
                    return function () {
                      return e;
                    };
                  })(),
                  u = (function () {
                    var e = /^((?!chrome|android).)*safari/i.test(
                      navigator.userAgent
                    );
                    return function () {
                      return e;
                    };
                  })(),
                  p = (function () {
                    var e =
                      -1 !== navigator.userAgent.indexOf("Firefox") &&
                      -1 !== navigator.userAgent.indexOf("Android");
                    return function () {
                      return e;
                    };
                  })(),
                  f =
                    ((t = navigator.userAgent.match(/.*Chrome\/([0-9]+)/)),
                    (i = t ? parseInt(t[1], 10) : null),
                    function () {
                      return i;
                    }),
                  m = (function () {
                    var e = !1;
                    return (
                      (e =
                        h() &&
                        u() &&
                        -1 !== navigator.userAgent.indexOf("13_4")),
                      function () {
                        return e;
                      }
                    );
                  })(),
                  g = (function () {
                    var e = !1;
                    if (65 === f()) {
                      var t = navigator.userAgent.match(/.*Chrome\/([0-9\.]*)/);
                      if (t) {
                        var i = t[1].split("."),
                          r = a(i, 4),
                          n = (r[0], r[1], r[2]),
                          s = r[3];
                        e = 3325 === parseInt(n, 10) && parseInt(s, 10) < 148;
                      }
                    }
                    return function () {
                      return e;
                    };
                  })(),
                  v = (function () {
                    var e = -1 !== navigator.userAgent.indexOf("R7 Build");
                    return function () {
                      return e;
                    };
                  })(),
                  w = function () {
                    var e =
                      90 == window.orientation || -90 == window.orientation;
                    return v() ? !e : e;
                  },
                  y = function (e) {
                    return !(isNaN(e) || e <= A || e > o);
                  },
                  E = function () {
                    return (
                      Math.max(window.screen.width, window.screen.height) *
                      window.devicePixelRatio
                    );
                  },
                  b = function () {
                    return (
                      Math.min(window.screen.width, window.screen.height) *
                      window.devicePixelRatio
                    );
                  },
                  _ = function (e) {
                    if (d()) return !1;
                    if (e.requestFullscreen) e.requestFullscreen();
                    else if (e.webkitRequestFullscreen)
                      e.webkitRequestFullscreen();
                    else if (e.mozRequestFullScreen) e.mozRequestFullScreen();
                    else {
                      if (!e.msRequestFullscreen) return !1;
                      e.msRequestFullscreen();
                    }
                    return !0;
                  },
                  D = function () {
                    if (document.exitFullscreen) document.exitFullscreen();
                    else if (document.webkitExitFullscreen)
                      document.webkitExitFullscreen();
                    else if (document.mozCancelFullScreen)
                      document.mozCancelFullScreen();
                    else {
                      if (!document.msExitFullscreen) return !1;
                      document.msExitFullscreen();
                    }
                    return !0;
                  },
                  M = function () {
                    return (
                      document.fullscreenElement ||
                      document.webkitFullscreenElement ||
                      document.mozFullScreenElement ||
                      document.msFullscreenElement
                    );
                  },
                  F = function (e, t, i, r) {
                    var n = e.createShader(e.VERTEX_SHADER);
                    e.shaderSource(n, t), e.compileShader(n);
                    var s = e.createShader(e.FRAGMENT_SHADER);
                    e.shaderSource(s, i), e.compileShader(s);
                    var a = e.createProgram();
                    for (var A in (e.attachShader(a, n),
                    e.attachShader(a, s),
                    r))
                      e.bindAttribLocation(a, r[A], A);
                    return (
                      e.linkProgram(a), e.deleteShader(n), e.deleteShader(s), a
                    );
                  },
                  T = function (e, t) {
                    for (
                      var i = {},
                        r = e.getProgramParameter(t, e.ACTIVE_UNIFORMS),
                        n = "",
                        s = 0;
                      s < r;
                      s++
                    )
                      i[
                        (n = e.getActiveUniform(t, s).name.replace("[0]", ""))
                      ] = e.getUniformLocation(t, n);
                    return i;
                  },
                  B = function (e, t, i, r, n, s, a) {
                    var A = 1 / (t - i),
                      o = 1 / (r - n),
                      l = 1 / (s - a);
                    return (
                      (e[0] = -2 * A),
                      (e[1] = 0),
                      (e[2] = 0),
                      (e[3] = 0),
                      (e[4] = 0),
                      (e[5] = -2 * o),
                      (e[6] = 0),
                      (e[7] = 0),
                      (e[8] = 0),
                      (e[9] = 0),
                      (e[10] = 2 * l),
                      (e[11] = 0),
                      (e[12] = (t + i) * A),
                      (e[13] = (n + r) * o),
                      (e[14] = (a + s) * l),
                      (e[15] = 1),
                      e
                    );
                  },
                  R = function () {
                    var e,
                      t = !1;
                    return (
                      (e =
                        navigator.userAgent ||
                        navigator.vendor ||
                        window.opera),
                      (/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(
                        e
                      ) ||
                        /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(
                          e.substr(0, 4)
                        )) &&
                        (t = !0),
                      t
                    );
                  },
                  S = function (e, t) {
                    for (var i in t) t.hasOwnProperty(i) && (e[i] = t[i]);
                    return e;
                  },
                  C = function (e) {
                    if (h()) {
                      var t = e.style.width,
                        i = e.style.height;
                      (e.style.width = parseInt(t) + 1 + "px"),
                        (e.style.height = parseInt(i) + "px"),
                        setTimeout(function () {
                          (e.style.width = t), (e.style.height = i);
                        }, 100);
                    }
                    window.canvas = e;
                  },
                  I = (function () {
                    var e = Math.PI / 180,
                      t = 0.25 * Math.PI;
                    function i(i, r, n, s) {
                      var a = Math.tan(r ? r.upDegrees * e : t),
                        A = Math.tan(r ? r.downDegrees * e : t),
                        o = Math.tan(r ? r.leftDegrees * e : t),
                        l = Math.tan(r ? r.rightDegrees * e : t),
                        c = 2 / (o + l),
                        h = 2 / (a + A);
                      return (
                        (i[0] = c),
                        (i[1] = 0),
                        (i[2] = 0),
                        (i[3] = 0),
                        (i[4] = 0),
                        (i[5] = h),
                        (i[6] = 0),
                        (i[7] = 0),
                        (i[8] = -(o - l) * c * 0.5),
                        (i[9] = (a - A) * h * 0.5),
                        (i[10] = s / (n - s)),
                        (i[11] = -1),
                        (i[12] = 0),
                        (i[13] = 0),
                        (i[14] = (s * n) / (n - s)),
                        (i[15] = 0),
                        i
                      );
                    }
                    function r(e, t, i) {
                      var r = t[0],
                        n = t[1],
                        s = t[2],
                        a = t[3],
                        A = r + r,
                        o = n + n,
                        l = s + s,
                        c = r * A,
                        h = r * o,
                        d = r * l,
                        u = n * o,
                        p = n * l,
                        f = s * l,
                        m = a * A,
                        g = a * o,
                        v = a * l;
                      return (
                        (e[0] = 1 - (u + f)),
                        (e[1] = h + v),
                        (e[2] = d - g),
                        (e[3] = 0),
                        (e[4] = h - v),
                        (e[5] = 1 - (c + f)),
                        (e[6] = p + m),
                        (e[7] = 0),
                        (e[8] = d + g),
                        (e[9] = p - m),
                        (e[10] = 1 - (c + u)),
                        (e[11] = 0),
                        (e[12] = i[0]),
                        (e[13] = i[1]),
                        (e[14] = i[2]),
                        (e[15] = 1),
                        e
                      );
                    }
                    function n(e, t, i) {
                      var r,
                        n,
                        s,
                        a,
                        A,
                        o,
                        l,
                        c,
                        h,
                        d,
                        u,
                        p,
                        f = i[0],
                        m = i[1],
                        g = i[2];
                      return (
                        t === e
                          ? ((e[12] = t[0] * f + t[4] * m + t[8] * g + t[12]),
                            (e[13] = t[1] * f + t[5] * m + t[9] * g + t[13]),
                            (e[14] = t[2] * f + t[6] * m + t[10] * g + t[14]),
                            (e[15] = t[3] * f + t[7] * m + t[11] * g + t[15]))
                          : ((r = t[0]),
                            (n = t[1]),
                            (s = t[2]),
                            (a = t[3]),
                            (A = t[4]),
                            (o = t[5]),
                            (l = t[6]),
                            (c = t[7]),
                            (h = t[8]),
                            (d = t[9]),
                            (u = t[10]),
                            (p = t[11]),
                            (e[0] = r),
                            (e[1] = n),
                            (e[2] = s),
                            (e[3] = a),
                            (e[4] = A),
                            (e[5] = o),
                            (e[6] = l),
                            (e[7] = c),
                            (e[8] = h),
                            (e[9] = d),
                            (e[10] = u),
                            (e[11] = p),
                            (e[12] = r * f + A * m + h * g + t[12]),
                            (e[13] = n * f + o * m + d * g + t[13]),
                            (e[14] = s * f + l * m + u * g + t[14]),
                            (e[15] = a * f + c * m + p * g + t[15])),
                        e
                      );
                    }
                    function s(e, t) {
                      var i = t[0],
                        r = t[1],
                        n = t[2],
                        s = t[3],
                        a = t[4],
                        A = t[5],
                        o = t[6],
                        l = t[7],
                        c = t[8],
                        h = t[9],
                        d = t[10],
                        u = t[11],
                        p = t[12],
                        f = t[13],
                        m = t[14],
                        g = t[15],
                        v = i * A - r * a,
                        w = i * o - n * a,
                        y = i * l - s * a,
                        E = r * o - n * A,
                        b = r * l - s * A,
                        _ = n * l - s * o,
                        D = c * f - h * p,
                        M = c * m - d * p,
                        F = c * g - u * p,
                        T = h * m - d * f,
                        B = h * g - u * f,
                        R = d * g - u * m,
                        S = v * R - w * B + y * T + E * F - b * M + _ * D;
                      return S
                        ? ((S = 1 / S),
                          (e[0] = (A * R - o * B + l * T) * S),
                          (e[1] = (n * B - r * R - s * T) * S),
                          (e[2] = (f * _ - m * b + g * E) * S),
                          (e[3] = (d * b - h * _ - u * E) * S),
                          (e[4] = (o * F - a * R - l * M) * S),
                          (e[5] = (i * R - n * F + s * M) * S),
                          (e[6] = (m * y - p * _ - g * w) * S),
                          (e[7] = (c * _ - d * y + u * w) * S),
                          (e[8] = (a * B - A * F + l * D) * S),
                          (e[9] = (r * F - i * B - s * D) * S),
                          (e[10] = (p * b - f * y + g * v) * S),
                          (e[11] = (h * y - c * b - u * v) * S),
                          (e[12] = (A * M - a * T - o * D) * S),
                          (e[13] = (i * T - r * M + n * D) * S),
                          (e[14] = (f * w - p * E - m * v) * S),
                          (e[15] = (c * E - h * w + d * v) * S),
                          e)
                        : null;
                    }
                    var a = new Float32Array([0, 0, 0, 1]),
                      A = new Float32Array([0, 0, 0]);
                    function o(e, t, o, l, c, h) {
                      i(e, l || null, h.depthNear, h.depthFar),
                        r(t, o.orientation || a, o.position || A),
                        c && n(t, t, c),
                        s(t, t);
                    }
                    return function (e, t, i) {
                      return !(
                        !e ||
                        !t ||
                        ((e.pose = t),
                        (e.timestamp = t.timestamp),
                        o(
                          e.leftProjectionMatrix,
                          e.leftViewMatrix,
                          t,
                          i._getFieldOfView("left"),
                          i._getEyeOffset("left"),
                          i
                        ),
                        o(
                          e.rightProjectionMatrix,
                          e.rightViewMatrix,
                          t,
                          i._getFieldOfView("right"),
                          i._getEyeOffset("right"),
                          i
                        ),
                        0)
                      );
                    };
                  })(),
                  x = function () {
                    var e = window.self !== window.top,
                      t = L(document.referrer),
                      i = L(window.location.href);
                    return e && t !== i;
                  },
                  L = function (e) {
                    var t,
                      i = e.indexOf("://");
                    t = -1 !== i ? i + 3 : 0;
                    var r = e.indexOf("/", t);
                    return -1 === r && (r = e.length), e.substring(0, r);
                  },
                  P = function (e) {
                    return e.w > 1
                      ? (console.warn("getQuaternionAngle: w > 1"), 0)
                      : 2 * Math.acos(e.w);
                  },
                  N =
                    ((r = {}),
                    function (e, t) {
                      void 0 === r[e] &&
                        (console.warn("webvr-polyfill: " + t), (r[e] = !0));
                    }),
                  G = function (e, t) {
                    N(
                      e,
                      e +
                        " has been deprecated. This may not work on native WebVR displays. " +
                        (t ? "Please use " + t + " instead." : "")
                    );
                  };
                function O(e, t, i) {
                  if (t) {
                    for (var r = [], n = null, s = 0; s < t.length; ++s)
                      switch ((a = t[s])) {
                        case e.TEXTURE_BINDING_2D:
                        case e.TEXTURE_BINDING_CUBE_MAP:
                          if ((o = t[++s]) < e.TEXTURE0 || o > e.TEXTURE31) {
                            console.error(
                              "TEXTURE_BINDING_2D or TEXTURE_BINDING_CUBE_MAP must be followed by a valid texture unit"
                            ),
                              r.push(null, null);
                            break;
                          }
                          n || (n = e.getParameter(e.ACTIVE_TEXTURE)),
                            e.activeTexture(o),
                            r.push(e.getParameter(a), null);
                          break;
                        case e.ACTIVE_TEXTURE:
                          (n = e.getParameter(e.ACTIVE_TEXTURE)), r.push(null);
                          break;
                        default:
                          r.push(e.getParameter(a));
                      }
                    for (i(e), s = 0; s < t.length; ++s) {
                      var a = t[s],
                        A = r[s];
                      switch (a) {
                        case e.ACTIVE_TEXTURE:
                          break;
                        case e.ARRAY_BUFFER_BINDING:
                          e.bindBuffer(e.ARRAY_BUFFER, A);
                          break;
                        case e.COLOR_CLEAR_VALUE:
                          e.clearColor(A[0], A[1], A[2], A[3]);
                          break;
                        case e.COLOR_WRITEMASK:
                          e.colorMask(A[0], A[1], A[2], A[3]);
                          break;
                        case e.CURRENT_PROGRAM:
                          e.useProgram(A);
                          break;
                        case e.ELEMENT_ARRAY_BUFFER_BINDING:
                          e.bindBuffer(e.ELEMENT_ARRAY_BUFFER, A);
                          break;
                        case e.FRAMEBUFFER_BINDING:
                          e.bindFramebuffer(e.FRAMEBUFFER, A);
                          break;
                        case e.RENDERBUFFER_BINDING:
                          e.bindRenderbuffer(e.RENDERBUFFER, A);
                          break;
                        case e.TEXTURE_BINDING_2D:
                          if ((o = t[++s]) < e.TEXTURE0 || o > e.TEXTURE31)
                            break;
                          e.activeTexture(o), e.bindTexture(e.TEXTURE_2D, A);
                          break;
                        case e.TEXTURE_BINDING_CUBE_MAP:
                          var o;
                          if ((o = t[++s]) < e.TEXTURE0 || o > e.TEXTURE31)
                            break;
                          e.activeTexture(o),
                            e.bindTexture(e.TEXTURE_CUBE_MAP, A);
                          break;
                        case e.VIEWPORT:
                          e.viewport(A[0], A[1], A[2], A[3]);
                          break;
                        case e.BLEND:
                        case e.CULL_FACE:
                        case e.DEPTH_TEST:
                        case e.SCISSOR_TEST:
                        case e.STENCIL_TEST:
                          A ? e.enable(a) : e.disable(a);
                          break;
                        default:
                          console.log(
                            "No GL restore behavior for 0x" + a.toString(16)
                          );
                      }
                      n && e.activeTexture(n);
                    }
                  } else i(e);
                }
                var Q = O,
                  U = [
                    "attribute vec2 position;",
                    "attribute vec3 texCoord;",
                    "varying vec2 vTexCoord;",
                    "uniform vec4 viewportOffsetScale[2];",
                    "void main() {",
                    "  vec4 viewport = viewportOffsetScale[int(texCoord.z)];",
                    "  vTexCoord = (texCoord.xy * viewport.zw) + viewport.xy;",
                    "  gl_Position = vec4( position, 1.0, 1.0 );",
                    "}",
                  ].join("\n"),
                  k = [
                    "precision mediump float;",
                    "uniform sampler2D diffuse;",
                    "varying vec2 vTexCoord;",
                    "void main() {",
                    "  gl_FragColor = texture2D(diffuse, vTexCoord);",
                    "}",
                  ].join("\n");
                function V(e, t, i, r) {
                  (this.gl = e),
                    (this.cardboardUI = t),
                    (this.bufferScale = i),
                    (this.dirtySubmitFrameBindings = r),
                    (this.ctxAttribs = e.getContextAttributes()),
                    (this.instanceExt = e.getExtension(
                      "ANGLE_instanced_arrays"
                    )),
                    (this.meshWidth = 20),
                    (this.meshHeight = 20),
                    (this.bufferWidth = e.drawingBufferWidth),
                    (this.bufferHeight = e.drawingBufferHeight),
                    (this.realBindFramebuffer = e.bindFramebuffer),
                    (this.realEnable = e.enable),
                    (this.realDisable = e.disable),
                    (this.realColorMask = e.colorMask),
                    (this.realClearColor = e.clearColor),
                    (this.realViewport = e.viewport),
                    h() ||
                      ((this.realCanvasWidth = Object.getOwnPropertyDescriptor(
                        e.canvas.__proto__,
                        "width"
                      )),
                      (this.realCanvasHeight = Object.getOwnPropertyDescriptor(
                        e.canvas.__proto__,
                        "height"
                      ))),
                    (this.isPatched = !1),
                    (this.lastBoundFramebuffer = null),
                    (this.cullFace = !1),
                    (this.depthTest = !1),
                    (this.blend = !1),
                    (this.scissorTest = !1),
                    (this.stencilTest = !1),
                    (this.viewport = [0, 0, 0, 0]),
                    (this.colorMask = [!0, !0, !0, !0]),
                    (this.clearColor = [0, 0, 0, 0]),
                    (this.attribs = { position: 0, texCoord: 1 }),
                    (this.program = F(e, U, k, this.attribs)),
                    (this.uniforms = T(e, this.program)),
                    (this.viewportOffsetScale = new Float32Array(8)),
                    this.setTextureBounds(),
                    (this.vertexBuffer = e.createBuffer()),
                    (this.indexBuffer = e.createBuffer()),
                    (this.indexCount = 0),
                    (this.renderTarget = e.createTexture()),
                    (this.framebuffer = e.createFramebuffer()),
                    (this.depthStencilBuffer = null),
                    (this.depthBuffer = null),
                    (this.stencilBuffer = null),
                    this.ctxAttribs.depth && this.ctxAttribs.stencil
                      ? (this.depthStencilBuffer = e.createRenderbuffer())
                      : this.ctxAttribs.depth
                      ? (this.depthBuffer = e.createRenderbuffer())
                      : this.ctxAttribs.stencil &&
                        (this.stencilBuffer = e.createRenderbuffer()),
                    this.patch(),
                    this.onResize();
                }
                (V.prototype.destroy = function () {
                  var e = this.gl;
                  this.unpatch(),
                    e.deleteProgram(this.program),
                    e.deleteBuffer(this.vertexBuffer),
                    e.deleteBuffer(this.indexBuffer),
                    e.deleteTexture(this.renderTarget),
                    e.deleteFramebuffer(this.framebuffer),
                    this.depthStencilBuffer &&
                      e.deleteRenderbuffer(this.depthStencilBuffer),
                    this.depthBuffer && e.deleteRenderbuffer(this.depthBuffer),
                    this.stencilBuffer &&
                      e.deleteRenderbuffer(this.stencilBuffer),
                    this.cardboardUI && this.cardboardUI.destroy();
                }),
                  (V.prototype.onResize = function () {
                    var e = this.gl,
                      t = this,
                      i = [
                        e.RENDERBUFFER_BINDING,
                        e.TEXTURE_BINDING_2D,
                        e.TEXTURE0,
                      ];
                    Q(e, i, function (e) {
                      t.realBindFramebuffer.call(e, e.FRAMEBUFFER, null),
                        t.scissorTest && t.realDisable.call(e, e.SCISSOR_TEST),
                        t.realColorMask.call(e, !0, !0, !0, !0),
                        t.realViewport.call(
                          e,
                          0,
                          0,
                          e.drawingBufferWidth,
                          e.drawingBufferHeight
                        ),
                        t.realClearColor.call(e, 0, 0, 0, 1),
                        e.clear(e.COLOR_BUFFER_BIT),
                        t.realBindFramebuffer.call(
                          e,
                          e.FRAMEBUFFER,
                          t.framebuffer
                        ),
                        e.bindTexture(e.TEXTURE_2D, t.renderTarget),
                        e.texImage2D(
                          e.TEXTURE_2D,
                          0,
                          t.ctxAttribs.alpha ? e.RGBA : e.RGB,
                          t.bufferWidth,
                          t.bufferHeight,
                          0,
                          t.ctxAttribs.alpha ? e.RGBA : e.RGB,
                          e.UNSIGNED_BYTE,
                          null
                        ),
                        e.texParameteri(
                          e.TEXTURE_2D,
                          e.TEXTURE_MAG_FILTER,
                          e.LINEAR
                        ),
                        e.texParameteri(
                          e.TEXTURE_2D,
                          e.TEXTURE_MIN_FILTER,
                          e.LINEAR
                        ),
                        e.texParameteri(
                          e.TEXTURE_2D,
                          e.TEXTURE_WRAP_S,
                          e.CLAMP_TO_EDGE
                        ),
                        e.texParameteri(
                          e.TEXTURE_2D,
                          e.TEXTURE_WRAP_T,
                          e.CLAMP_TO_EDGE
                        ),
                        e.framebufferTexture2D(
                          e.FRAMEBUFFER,
                          e.COLOR_ATTACHMENT0,
                          e.TEXTURE_2D,
                          t.renderTarget,
                          0
                        ),
                        t.ctxAttribs.depth && t.ctxAttribs.stencil
                          ? (e.bindRenderbuffer(
                              e.RENDERBUFFER,
                              t.depthStencilBuffer
                            ),
                            e.renderbufferStorage(
                              e.RENDERBUFFER,
                              e.DEPTH_STENCIL,
                              t.bufferWidth,
                              t.bufferHeight
                            ),
                            e.framebufferRenderbuffer(
                              e.FRAMEBUFFER,
                              e.DEPTH_STENCIL_ATTACHMENT,
                              e.RENDERBUFFER,
                              t.depthStencilBuffer
                            ))
                          : t.ctxAttribs.depth
                          ? (e.bindRenderbuffer(e.RENDERBUFFER, t.depthBuffer),
                            e.renderbufferStorage(
                              e.RENDERBUFFER,
                              e.DEPTH_COMPONENT16,
                              t.bufferWidth,
                              t.bufferHeight
                            ),
                            e.framebufferRenderbuffer(
                              e.FRAMEBUFFER,
                              e.DEPTH_ATTACHMENT,
                              e.RENDERBUFFER,
                              t.depthBuffer
                            ))
                          : t.ctxAttribs.stencil &&
                            (e.bindRenderbuffer(
                              e.RENDERBUFFER,
                              t.stencilBuffer
                            ),
                            e.renderbufferStorage(
                              e.RENDERBUFFER,
                              e.STENCIL_INDEX8,
                              t.bufferWidth,
                              t.bufferHeight
                            ),
                            e.framebufferRenderbuffer(
                              e.FRAMEBUFFER,
                              e.STENCIL_ATTACHMENT,
                              e.RENDERBUFFER,
                              t.stencilBuffer
                            )),
                        !e.checkFramebufferStatus(e.FRAMEBUFFER) ===
                          e.FRAMEBUFFER_COMPLETE &&
                          console.error("Framebuffer incomplete!"),
                        t.realBindFramebuffer.call(
                          e,
                          e.FRAMEBUFFER,
                          t.lastBoundFramebuffer
                        ),
                        t.scissorTest && t.realEnable.call(e, e.SCISSOR_TEST),
                        t.realColorMask.apply(e, t.colorMask),
                        t.realViewport.apply(e, t.viewport),
                        t.realClearColor.apply(e, t.clearColor);
                    }),
                      this.cardboardUI && this.cardboardUI.onResize();
                  }),
                  (V.prototype.patch = function () {
                    if (!this.isPatched) {
                      var e = this,
                        t = this.gl.canvas,
                        i = this.gl;
                      h() ||
                        ((t.width = E() * this.bufferScale),
                        (t.height = b() * this.bufferScale),
                        Object.defineProperty(t, "width", {
                          configurable: !0,
                          enumerable: !0,
                          get: function () {
                            return e.bufferWidth;
                          },
                          set: function (i) {
                            (e.bufferWidth = i),
                              e.realCanvasWidth.set.call(t, i),
                              e.onResize();
                          },
                        }),
                        Object.defineProperty(t, "height", {
                          configurable: !0,
                          enumerable: !0,
                          get: function () {
                            return e.bufferHeight;
                          },
                          set: function (i) {
                            (e.bufferHeight = i),
                              e.realCanvasHeight.set.call(t, i),
                              e.onResize();
                          },
                        })),
                        (this.lastBoundFramebuffer = i.getParameter(
                          i.FRAMEBUFFER_BINDING
                        )),
                        null == this.lastBoundFramebuffer &&
                          ((this.lastBoundFramebuffer = this.framebuffer),
                          this.gl.bindFramebuffer(
                            i.FRAMEBUFFER,
                            this.framebuffer
                          )),
                        (this.gl.bindFramebuffer = function (t, r) {
                          (e.lastBoundFramebuffer = r || e.framebuffer),
                            e.realBindFramebuffer.call(
                              i,
                              t,
                              e.lastBoundFramebuffer
                            );
                        }),
                        (this.cullFace = i.getParameter(i.CULL_FACE)),
                        (this.depthTest = i.getParameter(i.DEPTH_TEST)),
                        (this.blend = i.getParameter(i.BLEND)),
                        (this.scissorTest = i.getParameter(i.SCISSOR_TEST)),
                        (this.stencilTest = i.getParameter(i.STENCIL_TEST)),
                        (i.enable = function (t) {
                          switch (t) {
                            case i.CULL_FACE:
                              e.cullFace = !0;
                              break;
                            case i.DEPTH_TEST:
                              e.depthTest = !0;
                              break;
                            case i.BLEND:
                              e.blend = !0;
                              break;
                            case i.SCISSOR_TEST:
                              e.scissorTest = !0;
                              break;
                            case i.STENCIL_TEST:
                              e.stencilTest = !0;
                          }
                          e.realEnable.call(i, t);
                        }),
                        (i.disable = function (t) {
                          switch (t) {
                            case i.CULL_FACE:
                              e.cullFace = !1;
                              break;
                            case i.DEPTH_TEST:
                              e.depthTest = !1;
                              break;
                            case i.BLEND:
                              e.blend = !1;
                              break;
                            case i.SCISSOR_TEST:
                              e.scissorTest = !1;
                              break;
                            case i.STENCIL_TEST:
                              e.stencilTest = !1;
                          }
                          e.realDisable.call(i, t);
                        }),
                        (this.colorMask = i.getParameter(i.COLOR_WRITEMASK)),
                        (i.colorMask = function (t, r, n, s) {
                          (e.colorMask[0] = t),
                            (e.colorMask[1] = r),
                            (e.colorMask[2] = n),
                            (e.colorMask[3] = s),
                            e.realColorMask.call(i, t, r, n, s);
                        }),
                        (this.clearColor = i.getParameter(i.COLOR_CLEAR_VALUE)),
                        (i.clearColor = function (t, r, n, s) {
                          (e.clearColor[0] = t),
                            (e.clearColor[1] = r),
                            (e.clearColor[2] = n),
                            (e.clearColor[3] = s),
                            e.realClearColor.call(i, t, r, n, s);
                        }),
                        (this.viewport = i.getParameter(i.VIEWPORT)),
                        (i.viewport = function (t, r, n, s) {
                          (e.viewport[0] = t),
                            (e.viewport[1] = r),
                            (e.viewport[2] = n),
                            (e.viewport[3] = s),
                            e.realViewport.call(i, t, r, n, s);
                        }),
                        (this.isPatched = !0),
                        C(t);
                    }
                  }),
                  (V.prototype.unpatch = function () {
                    if (this.isPatched) {
                      var e = this.gl,
                        t = this.gl.canvas;
                      h() ||
                        (Object.defineProperty(
                          t,
                          "width",
                          this.realCanvasWidth
                        ),
                        Object.defineProperty(
                          t,
                          "height",
                          this.realCanvasHeight
                        )),
                        (t.width = this.bufferWidth),
                        (t.height = this.bufferHeight),
                        (e.bindFramebuffer = this.realBindFramebuffer),
                        (e.enable = this.realEnable),
                        (e.disable = this.realDisable),
                        (e.colorMask = this.realColorMask),
                        (e.clearColor = this.realClearColor),
                        (e.viewport = this.realViewport),
                        this.lastBoundFramebuffer == this.framebuffer &&
                          e.bindFramebuffer(e.FRAMEBUFFER, null),
                        (this.isPatched = !1),
                        setTimeout(function () {
                          C(t);
                        }, 1);
                    }
                  }),
                  (V.prototype.setTextureBounds = function (e, t) {
                    e || (e = [0, 0, 0.5, 1]),
                      t || (t = [0.5, 0, 0.5, 1]),
                      (this.viewportOffsetScale[0] = e[0]),
                      (this.viewportOffsetScale[1] = e[1]),
                      (this.viewportOffsetScale[2] = e[2]),
                      (this.viewportOffsetScale[3] = e[3]),
                      (this.viewportOffsetScale[4] = t[0]),
                      (this.viewportOffsetScale[5] = t[1]),
                      (this.viewportOffsetScale[6] = t[2]),
                      (this.viewportOffsetScale[7] = t[3]);
                  }),
                  (V.prototype.submitFrame = function () {
                    var e = this.gl,
                      t = this,
                      i = [];
                    if (
                      (this.dirtySubmitFrameBindings ||
                        i.push(
                          e.CURRENT_PROGRAM,
                          e.ARRAY_BUFFER_BINDING,
                          e.ELEMENT_ARRAY_BUFFER_BINDING,
                          e.TEXTURE_BINDING_2D,
                          e.TEXTURE0
                        ),
                      Q(e, i, function (e) {
                        t.realBindFramebuffer.call(e, e.FRAMEBUFFER, null);
                        var i = 0,
                          r = 0;
                        t.instanceExt &&
                          ((i = e.getVertexAttrib(
                            t.attribs.position,
                            t.instanceExt.VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE
                          )),
                          (r = e.getVertexAttrib(
                            t.attribs.texCoord,
                            t.instanceExt.VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE
                          ))),
                          t.cullFace && t.realDisable.call(e, e.CULL_FACE),
                          t.depthTest && t.realDisable.call(e, e.DEPTH_TEST),
                          t.blend && t.realDisable.call(e, e.BLEND),
                          t.scissorTest &&
                            t.realDisable.call(e, e.SCISSOR_TEST),
                          t.stencilTest &&
                            t.realDisable.call(e, e.STENCIL_TEST),
                          t.realColorMask.call(e, !0, !0, !0, !0),
                          t.realViewport.call(
                            e,
                            0,
                            0,
                            e.drawingBufferWidth,
                            e.drawingBufferHeight
                          ),
                          (t.ctxAttribs.alpha || h()) &&
                            (t.realClearColor.call(e, 0, 0, 0, 1),
                            e.clear(e.COLOR_BUFFER_BIT)),
                          e.useProgram(t.program),
                          e.bindBuffer(e.ELEMENT_ARRAY_BUFFER, t.indexBuffer),
                          e.bindBuffer(e.ARRAY_BUFFER, t.vertexBuffer),
                          e.enableVertexAttribArray(t.attribs.position),
                          e.enableVertexAttribArray(t.attribs.texCoord),
                          e.vertexAttribPointer(
                            t.attribs.position,
                            2,
                            e.FLOAT,
                            !1,
                            20,
                            0
                          ),
                          e.vertexAttribPointer(
                            t.attribs.texCoord,
                            3,
                            e.FLOAT,
                            !1,
                            20,
                            8
                          ),
                          t.instanceExt &&
                            (0 != i &&
                              t.instanceExt.vertexAttribDivisorANGLE(
                                t.attribs.position,
                                0
                              ),
                            0 != r &&
                              t.instanceExt.vertexAttribDivisorANGLE(
                                t.attribs.texCoord,
                                0
                              )),
                          e.activeTexture(e.TEXTURE0),
                          e.uniform1i(t.uniforms.diffuse, 0),
                          e.bindTexture(e.TEXTURE_2D, t.renderTarget),
                          e.uniform4fv(
                            t.uniforms.viewportOffsetScale,
                            t.viewportOffsetScale
                          ),
                          e.drawElements(
                            e.TRIANGLES,
                            t.indexCount,
                            e.UNSIGNED_SHORT,
                            0
                          ),
                          t.cardboardUI && t.cardboardUI.renderNoState(),
                          t.realBindFramebuffer.call(
                            t.gl,
                            e.FRAMEBUFFER,
                            t.framebuffer
                          ),
                          t.ctxAttribs.preserveDrawingBuffer ||
                            (t.realClearColor.call(e, 0, 0, 0, 0),
                            e.clear(e.COLOR_BUFFER_BIT)),
                          t.dirtySubmitFrameBindings ||
                            t.realBindFramebuffer.call(
                              e,
                              e.FRAMEBUFFER,
                              t.lastBoundFramebuffer
                            ),
                          t.cullFace && t.realEnable.call(e, e.CULL_FACE),
                          t.depthTest && t.realEnable.call(e, e.DEPTH_TEST),
                          t.blend && t.realEnable.call(e, e.BLEND),
                          t.scissorTest && t.realEnable.call(e, e.SCISSOR_TEST),
                          t.stencilTest && t.realEnable.call(e, e.STENCIL_TEST),
                          t.realColorMask.apply(e, t.colorMask),
                          t.realViewport.apply(e, t.viewport),
                          (!t.ctxAttribs.alpha &&
                            t.ctxAttribs.preserveDrawingBuffer) ||
                            t.realClearColor.apply(e, t.clearColor),
                          t.instanceExt &&
                            (0 != i &&
                              t.instanceExt.vertexAttribDivisorANGLE(
                                t.attribs.position,
                                i
                              ),
                            0 != r &&
                              t.instanceExt.vertexAttribDivisorANGLE(
                                t.attribs.texCoord,
                                r
                              ));
                      }),
                      h())
                    ) {
                      var r = e.canvas;
                      (r.width == t.bufferWidth &&
                        r.height == t.bufferHeight) ||
                        ((t.bufferWidth = r.width),
                        (t.bufferHeight = r.height),
                        t.onResize());
                    }
                  }),
                  (V.prototype.updateDeviceInfo = function (e) {
                    var t = this.gl,
                      i = this,
                      r = [
                        t.ARRAY_BUFFER_BINDING,
                        t.ELEMENT_ARRAY_BUFFER_BINDING,
                      ];
                    Q(t, r, function (t) {
                      var r = i.computeMeshVertices_(
                        i.meshWidth,
                        i.meshHeight,
                        e
                      );
                      if (
                        (t.bindBuffer(t.ARRAY_BUFFER, i.vertexBuffer),
                        t.bufferData(t.ARRAY_BUFFER, r, t.STATIC_DRAW),
                        !i.indexCount)
                      ) {
                        var n = i.computeMeshIndices_(
                          i.meshWidth,
                          i.meshHeight
                        );
                        t.bindBuffer(t.ELEMENT_ARRAY_BUFFER, i.indexBuffer),
                          t.bufferData(
                            t.ELEMENT_ARRAY_BUFFER,
                            n,
                            t.STATIC_DRAW
                          ),
                          (i.indexCount = n.length);
                      }
                    });
                  }),
                  (V.prototype.computeMeshVertices_ = function (e, t, i) {
                    for (
                      var r = new Float32Array(2 * e * t * 5),
                        n = i.getLeftEyeVisibleTanAngles(),
                        s = i.getLeftEyeNoLensTanAngles(),
                        a = i.getLeftEyeVisibleScreenRect(s),
                        A = 0,
                        o = 0;
                      o < 2;
                      o++
                    ) {
                      for (var l = 0; l < t; l++)
                        for (var h = 0; h < e; h++, A++) {
                          var d = h / (e - 1),
                            u = l / (t - 1),
                            p = d,
                            f = u,
                            m = c(n[0], n[2], d),
                            g = c(n[3], n[1], u),
                            v = Math.sqrt(m * m + g * g),
                            w = i.distortion.distortInverse(v),
                            y = (g * w) / v;
                          (d = ((m * w) / v - s[0]) / (s[2] - s[0])),
                            (u = (y - s[3]) / (s[1] - s[3])),
                            (d = 2 * (a.x + d * a.width - 0.5)),
                            (u = 2 * (a.y + u * a.height - 0.5)),
                            (r[5 * A + 0] = d),
                            (r[5 * A + 1] = u),
                            (r[5 * A + 2] = p),
                            (r[5 * A + 3] = f),
                            (r[5 * A + 4] = o);
                        }
                      var E = n[2] - n[0];
                      (n[0] = -(E + n[0])),
                        (n[2] = E - n[2]),
                        (E = s[2] - s[0]),
                        (s[0] = -(E + s[0])),
                        (s[2] = E - s[2]),
                        (a.x = 1 - (a.x + a.width));
                    }
                    return r;
                  }),
                  (V.prototype.computeMeshIndices_ = function (e, t) {
                    for (
                      var i = new Uint16Array(2 * (e - 1) * (t - 1) * 6),
                        r = e / 2,
                        n = t / 2,
                        s = 0,
                        a = 0,
                        A = 0;
                      A < 2;
                      A++
                    )
                      for (var o = 0; o < t; o++)
                        for (var l = 0; l < e; l++, s++)
                          0 != l &&
                            0 != o &&
                            (l <= r == o <= n
                              ? ((i[a++] = s),
                                (i[a++] = s - e - 1),
                                (i[a++] = s - e),
                                (i[a++] = s - e - 1),
                                (i[a++] = s),
                                (i[a++] = s - 1))
                              : ((i[a++] = s - 1),
                                (i[a++] = s - e),
                                (i[a++] = s),
                                (i[a++] = s - e),
                                (i[a++] = s - 1),
                                (i[a++] = s - e - 1)));
                    return i;
                  }),
                  (V.prototype.getOwnPropertyDescriptor_ = function (e, t) {
                    var i = Object.getOwnPropertyDescriptor(e, t);
                    return (
                      (void 0 !== i.get && void 0 !== i.set) ||
                        ((i.configurable = !0),
                        (i.enumerable = !0),
                        (i.get = function () {
                          return this.getAttribute(t);
                        }),
                        (i.set = function (e) {
                          this.setAttribute(t, e);
                        })),
                      i
                    );
                  });
                var z = [
                    "attribute vec2 position;",
                    "uniform mat4 projectionMat;",
                    "void main() {",
                    "  gl_Position = projectionMat * vec4( position, -1.0, 1.0 );",
                    "}",
                  ].join("\n"),
                  H = [
                    "precision mediump float;",
                    "uniform vec4 color;",
                    "void main() {",
                    "  gl_FragColor = color;",
                    "}",
                  ].join("\n"),
                  W = Math.PI / 180,
                  X = 60,
                  Y = 12,
                  Z = 20,
                  j = 1,
                  K = 0.75,
                  J = 0.3125,
                  q = 4,
                  $ = 28,
                  ee = 1.5;
                function te(e) {
                  (this.gl = e),
                    (this.attribs = { position: 0 }),
                    (this.program = F(e, z, H, this.attribs)),
                    (this.uniforms = T(e, this.program)),
                    (this.vertexBuffer = e.createBuffer()),
                    (this.gearOffset = 0),
                    (this.gearVertexCount = 0),
                    (this.arrowOffset = 0),
                    (this.arrowVertexCount = 0),
                    (this.projMat = new Float32Array(16)),
                    (this.listener = null),
                    this.onResize();
                }
                function ie(e) {
                  this.coefficients = e;
                }
                (te.prototype.destroy = function () {
                  var e = this.gl;
                  this.listener &&
                    e.canvas.removeEventListener("click", this.listener, !1),
                    e.deleteProgram(this.program),
                    e.deleteBuffer(this.vertexBuffer);
                }),
                  (te.prototype.listen = function (e, t) {
                    var i = this.gl.canvas;
                    (this.listener = function (r) {
                      var n = i.clientWidth / 2,
                        s = $ * ee;
                      r.clientX > n - s &&
                      r.clientX < n + s &&
                      r.clientY > i.clientHeight - s
                        ? e(r)
                        : r.clientX < s && r.clientY < s && t(r);
                    }),
                      i.addEventListener("click", this.listener, !1);
                  }),
                  (te.prototype.onResize = function () {
                    var e = this.gl,
                      t = this,
                      i = [e.ARRAY_BUFFER_BINDING];
                    Q(e, i, function (e) {
                      var i = [],
                        r = e.drawingBufferWidth / 2,
                        n =
                          Math.max(screen.width, screen.height) *
                          window.devicePixelRatio,
                        s =
                          (e.drawingBufferWidth / n) * window.devicePixelRatio,
                        a = (q * s) / 2,
                        A = $ * ee * s,
                        o = ($ * s) / 2,
                        l = ($ * ee - $) * s;
                      function c(e, t) {
                        var n = (90 - e) * W,
                          s = Math.cos(n),
                          a = Math.sin(n);
                        i.push(J * s * o + r, J * a * o + o),
                          i.push(t * s * o + r, t * a * o + o);
                      }
                      i.push(r - a, A),
                        i.push(r - a, e.drawingBufferHeight),
                        i.push(r + a, A),
                        i.push(r + a, e.drawingBufferHeight),
                        (t.gearOffset = i.length / 2);
                      for (var h = 0; h <= 6; h++) {
                        var d = h * X;
                        c(d, j),
                          c(d + Y, j),
                          c(d + Z, K),
                          c(d + (X - Z), K),
                          c(d + (X - Y), j);
                      }
                      function u(t, r) {
                        i.push(l + t, e.drawingBufferHeight - l - r);
                      }
                      (t.gearVertexCount = i.length / 2 - t.gearOffset),
                        (t.arrowOffset = i.length / 2);
                      var p = a / Math.sin(45 * W);
                      u(0, o),
                        u(o, 0),
                        u(o + p, p),
                        u(p, o + p),
                        u(p, o - p),
                        u(0, o),
                        u(o, 2 * o),
                        u(o + p, 2 * o - p),
                        u(p, o - p),
                        u(0, o),
                        u(p, o - a),
                        u($ * s, o - a),
                        u(p, o + a),
                        u($ * s, o + a),
                        (t.arrowVertexCount = i.length / 2 - t.arrowOffset),
                        e.bindBuffer(e.ARRAY_BUFFER, t.vertexBuffer),
                        e.bufferData(
                          e.ARRAY_BUFFER,
                          new Float32Array(i),
                          e.STATIC_DRAW
                        );
                    });
                  }),
                  (te.prototype.render = function () {
                    var e = this.gl,
                      t = this,
                      i = [
                        e.CULL_FACE,
                        e.DEPTH_TEST,
                        e.BLEND,
                        e.SCISSOR_TEST,
                        e.STENCIL_TEST,
                        e.COLOR_WRITEMASK,
                        e.VIEWPORT,
                        e.CURRENT_PROGRAM,
                        e.ARRAY_BUFFER_BINDING,
                      ];
                    Q(e, i, function (e) {
                      e.disable(e.CULL_FACE),
                        e.disable(e.DEPTH_TEST),
                        e.disable(e.BLEND),
                        e.disable(e.SCISSOR_TEST),
                        e.disable(e.STENCIL_TEST),
                        e.colorMask(!0, !0, !0, !0),
                        e.viewport(
                          0,
                          0,
                          e.drawingBufferWidth,
                          e.drawingBufferHeight
                        ),
                        t.renderNoState();
                    });
                  }),
                  (te.prototype.renderNoState = function () {
                    var e = this.gl;
                    e.useProgram(this.program),
                      e.bindBuffer(e.ARRAY_BUFFER, this.vertexBuffer),
                      e.enableVertexAttribArray(this.attribs.position),
                      e.vertexAttribPointer(
                        this.attribs.position,
                        2,
                        e.FLOAT,
                        !1,
                        8,
                        0
                      ),
                      e.uniform4f(this.uniforms.color, 1, 1, 1, 1),
                      B(
                        this.projMat,
                        0,
                        e.drawingBufferWidth,
                        0,
                        e.drawingBufferHeight,
                        0.1,
                        1024
                      ),
                      e.uniformMatrix4fv(
                        this.uniforms.projectionMat,
                        !1,
                        this.projMat
                      ),
                      e.drawArrays(e.TRIANGLE_STRIP, 0, 4),
                      e.drawArrays(
                        e.TRIANGLE_STRIP,
                        this.gearOffset,
                        this.gearVertexCount
                      ),
                      e.drawArrays(
                        e.TRIANGLE_STRIP,
                        this.arrowOffset,
                        this.arrowVertexCount
                      );
                  }),
                  (ie.prototype.distortInverse = function (e) {
                    for (
                      var t = 0, i = 1, r = e - this.distort(t);
                      Math.abs(i - t) > 1e-4;

                    ) {
                      var n = e - this.distort(i),
                        s = i - n * ((i - t) / (n - r));
                      (t = i), (i = s), (r = n);
                    }
                    return i;
                  }),
                  (ie.prototype.distort = function (e) {
                    for (
                      var t = e * e, i = 0, r = 0;
                      r < this.coefficients.length;
                      r++
                    )
                      i = t * (i + this.coefficients[r]);
                    return (i + 1) * e;
                  });
                var re = Math.PI / 180,
                  ne = 180 / Math.PI,
                  se = function (e, t, i) {
                    (this.x = e || 0), (this.y = t || 0), (this.z = i || 0);
                  };
                se.prototype = {
                  constructor: se,
                  set: function (e, t, i) {
                    return (this.x = e), (this.y = t), (this.z = i), this;
                  },
                  copy: function (e) {
                    return (this.x = e.x), (this.y = e.y), (this.z = e.z), this;
                  },
                  length: function () {
                    return Math.sqrt(
                      this.x * this.x + this.y * this.y + this.z * this.z
                    );
                  },
                  normalize: function () {
                    var e = this.length();
                    if (0 !== e) {
                      var t = 1 / e;
                      this.multiplyScalar(t);
                    } else (this.x = 0), (this.y = 0), (this.z = 0);
                    return this;
                  },
                  multiplyScalar: function (e) {
                    (this.x *= e), (this.y *= e), (this.z *= e);
                  },
                  applyQuaternion: function (e) {
                    var t = this.x,
                      i = this.y,
                      r = this.z,
                      n = e.x,
                      s = e.y,
                      a = e.z,
                      A = e.w,
                      o = A * t + s * r - a * i,
                      l = A * i + a * t - n * r,
                      c = A * r + n * i - s * t,
                      h = -n * t - s * i - a * r;
                    return (
                      (this.x = o * A + h * -n + l * -a - c * -s),
                      (this.y = l * A + h * -s + c * -n - o * -a),
                      (this.z = c * A + h * -a + o * -s - l * -n),
                      this
                    );
                  },
                  dot: function (e) {
                    return this.x * e.x + this.y * e.y + this.z * e.z;
                  },
                  crossVectors: function (e, t) {
                    var i = e.x,
                      r = e.y,
                      n = e.z,
                      s = t.x,
                      a = t.y,
                      A = t.z;
                    return (
                      (this.x = r * A - n * a),
                      (this.y = n * s - i * A),
                      (this.z = i * a - r * s),
                      this
                    );
                  },
                };
                var ae,
                  Ae,
                  oe,
                  le = function (e, t, i, r) {
                    (this.x = e || 0),
                      (this.y = t || 0),
                      (this.z = i || 0),
                      (this.w = void 0 !== r ? r : 1);
                  };
                function ce(e) {
                  (this.width = e.width || E()),
                    (this.height = e.height || b()),
                    (this.widthMeters = e.widthMeters),
                    (this.heightMeters = e.heightMeters),
                    (this.bevelMeters = e.bevelMeters);
                }
                le.prototype = {
                  constructor: le,
                  set: function (e, t, i, r) {
                    return (
                      (this.x = e),
                      (this.y = t),
                      (this.z = i),
                      (this.w = r),
                      this
                    );
                  },
                  copy: function (e) {
                    return (
                      (this.x = e.x),
                      (this.y = e.y),
                      (this.z = e.z),
                      (this.w = e.w),
                      this
                    );
                  },
                  setFromEulerXYZ: function (e, t, i) {
                    var r = Math.cos(e / 2),
                      n = Math.cos(t / 2),
                      s = Math.cos(i / 2),
                      a = Math.sin(e / 2),
                      A = Math.sin(t / 2),
                      o = Math.sin(i / 2);
                    return (
                      (this.x = a * n * s + r * A * o),
                      (this.y = r * A * s - a * n * o),
                      (this.z = r * n * o + a * A * s),
                      (this.w = r * n * s - a * A * o),
                      this
                    );
                  },
                  setFromEulerYXZ: function (e, t, i) {
                    var r = Math.cos(e / 2),
                      n = Math.cos(t / 2),
                      s = Math.cos(i / 2),
                      a = Math.sin(e / 2),
                      A = Math.sin(t / 2),
                      o = Math.sin(i / 2);
                    return (
                      (this.x = a * n * s + r * A * o),
                      (this.y = r * A * s - a * n * o),
                      (this.z = r * n * o - a * A * s),
                      (this.w = r * n * s + a * A * o),
                      this
                    );
                  },
                  setFromAxisAngle: function (e, t) {
                    var i = t / 2,
                      r = Math.sin(i);
                    return (
                      (this.x = e.x * r),
                      (this.y = e.y * r),
                      (this.z = e.z * r),
                      (this.w = Math.cos(i)),
                      this
                    );
                  },
                  multiply: function (e) {
                    return this.multiplyQuaternions(this, e);
                  },
                  multiplyQuaternions: function (e, t) {
                    var i = e.x,
                      r = e.y,
                      n = e.z,
                      s = e.w,
                      a = t.x,
                      A = t.y,
                      o = t.z,
                      l = t.w;
                    return (
                      (this.x = i * l + s * a + r * o - n * A),
                      (this.y = r * l + s * A + n * a - i * o),
                      (this.z = n * l + s * o + i * A - r * a),
                      (this.w = s * l - i * a - r * A - n * o),
                      this
                    );
                  },
                  inverse: function () {
                    return (
                      (this.x *= -1),
                      (this.y *= -1),
                      (this.z *= -1),
                      this.normalize(),
                      this
                    );
                  },
                  normalize: function () {
                    var e = Math.sqrt(
                      this.x * this.x +
                        this.y * this.y +
                        this.z * this.z +
                        this.w * this.w
                    );
                    return (
                      0 === e
                        ? ((this.x = 0),
                          (this.y = 0),
                          (this.z = 0),
                          (this.w = 1))
                        : ((e = 1 / e),
                          (this.x = this.x * e),
                          (this.y = this.y * e),
                          (this.z = this.z * e),
                          (this.w = this.w * e)),
                      this
                    );
                  },
                  slerp: function (e, t) {
                    if (0 === t) return this;
                    if (1 === t) return this.copy(e);
                    var i = this.x,
                      r = this.y,
                      n = this.z,
                      s = this.w,
                      a = s * e.w + i * e.x + r * e.y + n * e.z;
                    if (
                      (a < 0
                        ? ((this.w = -e.w),
                          (this.x = -e.x),
                          (this.y = -e.y),
                          (this.z = -e.z),
                          (a = -a))
                        : this.copy(e),
                      a >= 1)
                    )
                      return (
                        (this.w = s),
                        (this.x = i),
                        (this.y = r),
                        (this.z = n),
                        this
                      );
                    var A = Math.acos(a),
                      o = Math.sqrt(1 - a * a);
                    if (Math.abs(o) < 0.001)
                      return (
                        (this.w = 0.5 * (s + this.w)),
                        (this.x = 0.5 * (i + this.x)),
                        (this.y = 0.5 * (r + this.y)),
                        (this.z = 0.5 * (n + this.z)),
                        this
                      );
                    var l = Math.sin((1 - t) * A) / o,
                      c = Math.sin(t * A) / o;
                    return (
                      (this.w = s * l + this.w * c),
                      (this.x = i * l + this.x * c),
                      (this.y = r * l + this.y * c),
                      (this.z = n * l + this.z * c),
                      this
                    );
                  },
                  setFromUnitVectors:
                    ((oe = 1e-6),
                    function (e, t) {
                      return (
                        void 0 === ae && (ae = new se()),
                        (Ae = e.dot(t) + 1) < oe
                          ? ((Ae = 0),
                            Math.abs(e.x) > Math.abs(e.z)
                              ? ae.set(-e.y, e.x, 0)
                              : ae.set(0, -e.z, e.y))
                          : ae.crossVectors(e, t),
                        (this.x = ae.x),
                        (this.y = ae.y),
                        (this.z = ae.z),
                        (this.w = Ae),
                        this.normalize(),
                        this
                      );
                    }),
                };
                var he = new ce({
                    widthMeters: 0.11,
                    heightMeters: 0.062,
                    bevelMeters: 0.004,
                  }),
                  de = new ce({
                    widthMeters: 0.1038,
                    heightMeters: 0.0584,
                    bevelMeters: 0.004,
                  }),
                  ue = {
                    CardboardV1: new fe({
                      id: "CardboardV1",
                      label: "Cardboard I/O 2014",
                      fov: 40,
                      interLensDistance: 0.06,
                      baselineLensDistance: 0.035,
                      screenLensDistance: 0.042,
                      distortionCoefficients: [0.441, 0.156],
                      inverseCoefficients: [
                        -0.4410035, 0.42756155, -0.4804439, 0.5460139,
                        -0.58821183, 0.5733938, -0.48303202, 0.33299083,
                        -0.17573841, 0.0651772, -0.01488963, 0.001559834,
                      ],
                    }),
                    CardboardV2: new fe({
                      id: "CardboardV2",
                      label: "Cardboard I/O 2015",
                      fov: 60,
                      interLensDistance: 0.064,
                      baselineLensDistance: 0.035,
                      screenLensDistance: 0.039,
                      distortionCoefficients: [0.34, 0.55],
                      inverseCoefficients: [
                        -0.33836704, -0.18162185, 0.862655, -1.2462051,
                        1.0560602, -0.58208317, 0.21609078, -0.05444823,
                        0.009177956, -0.0009904169, 6183535e-11, -16981803e-13,
                      ],
                    }),
                  };
                function pe(e, t) {
                  (this.viewer = ue.CardboardV2),
                    this.updateDeviceParams(e),
                    (this.distortion = new ie(
                      this.viewer.distortionCoefficients
                    ));
                  for (var i = 0; i < t.length; i++) {
                    var r = t[i];
                    ue[r.id] = new fe(r);
                  }
                }
                function fe(e) {
                  (this.id = e.id),
                    (this.label = e.label),
                    (this.fov = e.fov),
                    (this.interLensDistance = e.interLensDistance),
                    (this.baselineLensDistance = e.baselineLensDistance),
                    (this.screenLensDistance = e.screenLensDistance),
                    (this.distortionCoefficients = e.distortionCoefficients),
                    (this.inverseCoefficients = e.inverseCoefficients);
                }
                (pe.prototype.updateDeviceParams = function (e) {
                  this.device = this.determineDevice_(e) || this.device;
                }),
                  (pe.prototype.getDevice = function () {
                    return this.device;
                  }),
                  (pe.prototype.setViewer = function (e) {
                    (this.viewer = e),
                      (this.distortion = new ie(
                        this.viewer.distortionCoefficients
                      ));
                  }),
                  (pe.prototype.determineDevice_ = function (e) {
                    if (!e)
                      return h()
                        ? (console.warn(
                            "Using fallback iOS device measurements."
                          ),
                          de)
                        : (console.warn(
                            "Using fallback Android device measurements."
                          ),
                          he);
                    var t = 0.0254,
                      i = t / e.xdpi,
                      r = t / e.ydpi;
                    return new ce({
                      widthMeters: i * E(),
                      heightMeters: r * b(),
                      bevelMeters: 0.001 * e.bevelMm,
                    });
                  }),
                  (pe.prototype.getDistortedFieldOfViewLeftEye = function () {
                    var e = this.viewer,
                      t = this.device,
                      i = this.distortion,
                      r = e.screenLensDistance,
                      n = (t.widthMeters - e.interLensDistance) / 2,
                      s = e.interLensDistance / 2,
                      a = e.baselineLensDistance - t.bevelMeters,
                      A = t.heightMeters - a,
                      o = ne * Math.atan(i.distort(n / r)),
                      l = ne * Math.atan(i.distort(s / r)),
                      c = ne * Math.atan(i.distort(a / r)),
                      h = ne * Math.atan(i.distort(A / r));
                    return {
                      leftDegrees: Math.min(o, e.fov),
                      rightDegrees: Math.min(l, e.fov),
                      downDegrees: Math.min(c, e.fov),
                      upDegrees: Math.min(h, e.fov),
                    };
                  }),
                  (pe.prototype.getLeftEyeVisibleTanAngles = function () {
                    var e = this.viewer,
                      t = this.device,
                      i = this.distortion,
                      r = Math.tan(-re * e.fov),
                      n = Math.tan(re * e.fov),
                      s = Math.tan(re * e.fov),
                      a = Math.tan(-re * e.fov),
                      A = t.widthMeters / 4,
                      o = t.heightMeters / 2,
                      l = e.baselineLensDistance - t.bevelMeters - o,
                      c = e.interLensDistance / 2 - A,
                      h = -l,
                      d = e.screenLensDistance,
                      u = i.distort((c - A) / d),
                      p = i.distort((h + o) / d),
                      f = i.distort((c + A) / d),
                      m = i.distort((h - o) / d),
                      g = new Float32Array(4);
                    return (
                      (g[0] = Math.max(r, u)),
                      (g[1] = Math.min(n, p)),
                      (g[2] = Math.min(s, f)),
                      (g[3] = Math.max(a, m)),
                      g
                    );
                  }),
                  (pe.prototype.getLeftEyeNoLensTanAngles = function () {
                    var e = this.viewer,
                      t = this.device,
                      i = this.distortion,
                      r = new Float32Array(4),
                      n = i.distortInverse(Math.tan(-re * e.fov)),
                      s = i.distortInverse(Math.tan(re * e.fov)),
                      a = i.distortInverse(Math.tan(re * e.fov)),
                      A = i.distortInverse(Math.tan(-re * e.fov)),
                      o = t.widthMeters / 4,
                      l = t.heightMeters / 2,
                      c = e.baselineLensDistance - t.bevelMeters - l,
                      h = e.interLensDistance / 2 - o,
                      d = -c,
                      u = e.screenLensDistance,
                      p = (h - o) / u,
                      f = (d + l) / u,
                      m = (h + o) / u,
                      g = (d - l) / u;
                    return (
                      (r[0] = Math.max(n, p)),
                      (r[1] = Math.min(s, f)),
                      (r[2] = Math.min(a, m)),
                      (r[3] = Math.max(A, g)),
                      r
                    );
                  }),
                  (pe.prototype.getLeftEyeVisibleScreenRect = function (e) {
                    var t = this.viewer,
                      i = this.device,
                      r = t.screenLensDistance,
                      n = (i.widthMeters - t.interLensDistance) / 2,
                      s = t.baselineLensDistance - i.bevelMeters,
                      a = (e[0] * r + n) / i.widthMeters,
                      A = (e[1] * r + s) / i.heightMeters,
                      o = (e[2] * r + n) / i.widthMeters,
                      l = (e[3] * r + s) / i.heightMeters;
                    return { x: a, y: l, width: o - a, height: A - l };
                  }),
                  (pe.prototype.getFieldOfViewLeftEye = function (e) {
                    return e
                      ? this.getUndistortedFieldOfViewLeftEye()
                      : this.getDistortedFieldOfViewLeftEye();
                  }),
                  (pe.prototype.getFieldOfViewRightEye = function (e) {
                    var t = this.getFieldOfViewLeftEye(e);
                    return {
                      leftDegrees: t.rightDegrees,
                      rightDegrees: t.leftDegrees,
                      upDegrees: t.upDegrees,
                      downDegrees: t.downDegrees,
                    };
                  }),
                  (pe.prototype.getUndistortedFieldOfViewLeftEye = function () {
                    var e = this.getUndistortedParams_();
                    return {
                      leftDegrees: ne * Math.atan(e.outerDist),
                      rightDegrees: ne * Math.atan(e.innerDist),
                      downDegrees: ne * Math.atan(e.bottomDist),
                      upDegrees: ne * Math.atan(e.topDist),
                    };
                  }),
                  (pe.prototype.getUndistortedViewportLeftEye = function () {
                    var e = this.getUndistortedParams_(),
                      t = this.viewer,
                      i = this.device,
                      r = t.screenLensDistance,
                      n = i.widthMeters / r,
                      s = i.heightMeters / r,
                      a = i.width / n,
                      A = i.height / s,
                      o = Math.round((e.eyePosX - e.outerDist) * a),
                      l = Math.round((e.eyePosY - e.bottomDist) * A);
                    return {
                      x: o,
                      y: l,
                      width: Math.round((e.eyePosX + e.innerDist) * a) - o,
                      height: Math.round((e.eyePosY + e.topDist) * A) - l,
                    };
                  }),
                  (pe.prototype.getUndistortedParams_ = function () {
                    var e = this.viewer,
                      t = this.device,
                      i = this.distortion,
                      r = e.screenLensDistance,
                      n = e.interLensDistance / 2 / r,
                      s = t.widthMeters / r,
                      a = t.heightMeters / r,
                      A = s / 2 - n,
                      o = (e.baselineLensDistance - t.bevelMeters) / r,
                      l = e.fov,
                      c = i.distortInverse(Math.tan(re * l)),
                      h = Math.min(A, c),
                      d = Math.min(n, c),
                      u = Math.min(o, c);
                    return {
                      outerDist: h,
                      innerDist: d,
                      topDist: Math.min(a - o, c),
                      bottomDist: u,
                      eyePosX: A,
                      eyePosY: o,
                    };
                  }),
                  (pe.Viewers = ue);
                var me = {
                  format: 1,
                  last_updated: "2019-11-09T17:36:14Z",
                  devices: [
                    {
                      type: "android",
                      rules: [{ mdmh: "asus/*/Nexus 7/*" }, { ua: "Nexus 7" }],
                      dpi: [320.8, 323],
                      bw: 3,
                      ac: 500,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "asus/*/ASUS_X00PD/*" },
                        { ua: "ASUS_X00PD" },
                      ],
                      dpi: 245,
                      bw: 3,
                      ac: 500,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "asus/*/ASUS_X008D/*" },
                        { ua: "ASUS_X008D" },
                      ],
                      dpi: 282,
                      bw: 3,
                      ac: 500,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "asus/*/ASUS_Z00AD/*" },
                        { ua: "ASUS_Z00AD" },
                      ],
                      dpi: [403, 404.6],
                      bw: 3,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "Google/*/Pixel 2 XL/*" },
                        { ua: "Pixel 2 XL" },
                      ],
                      dpi: 537.9,
                      bw: 3,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "Google/*/Pixel 3 XL/*" },
                        { ua: "Pixel 3 XL" },
                      ],
                      dpi: [558.5, 553.8],
                      bw: 3,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "Google/*/Pixel XL/*" },
                        { ua: "Pixel XL" },
                      ],
                      dpi: [537.9, 533],
                      bw: 3,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "Google/*/Pixel 3/*" },
                        { ua: "Pixel 3" },
                      ],
                      dpi: 442.4,
                      bw: 3,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "Google/*/Pixel 2/*" },
                        { ua: "Pixel 2" },
                      ],
                      dpi: 441,
                      bw: 3,
                      ac: 500,
                    },
                    {
                      type: "android",
                      rules: [{ mdmh: "Google/*/Pixel/*" }, { ua: "Pixel" }],
                      dpi: [432.6, 436.7],
                      bw: 3,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "HTC/*/HTC6435LVW/*" },
                        { ua: "HTC6435LVW" },
                      ],
                      dpi: [449.7, 443.3],
                      bw: 3,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "HTC/*/HTC One XL/*" },
                        { ua: "HTC One XL" },
                      ],
                      dpi: [315.3, 314.6],
                      bw: 3,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [{ mdmh: "htc/*/Nexus 9/*" }, { ua: "Nexus 9" }],
                      dpi: 289,
                      bw: 3,
                      ac: 500,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "HTC/*/HTC One M9/*" },
                        { ua: "HTC One M9" },
                      ],
                      dpi: [442.5, 443.3],
                      bw: 3,
                      ac: 500,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "HTC/*/HTC One_M8/*" },
                        { ua: "HTC One_M8" },
                      ],
                      dpi: [449.7, 447.4],
                      bw: 3,
                      ac: 500,
                    },
                    {
                      type: "android",
                      rules: [{ mdmh: "HTC/*/HTC One/*" }, { ua: "HTC One" }],
                      dpi: 472.8,
                      bw: 3,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "Huawei/*/Nexus 6P/*" },
                        { ua: "Nexus 6P" },
                      ],
                      dpi: [515.1, 518],
                      bw: 3,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "Huawei/*/BLN-L24/*" },
                        { ua: "HONORBLN-L24" },
                      ],
                      dpi: 480,
                      bw: 4,
                      ac: 500,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "Huawei/*/BKL-L09/*" },
                        { ua: "BKL-L09" },
                      ],
                      dpi: 403,
                      bw: 3.47,
                      ac: 500,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "LENOVO/*/Lenovo PB2-690Y/*" },
                        { ua: "Lenovo PB2-690Y" },
                      ],
                      dpi: [457.2, 454.713],
                      bw: 3,
                      ac: 500,
                    },
                    {
                      type: "android",
                      rules: [{ mdmh: "LGE/*/Nexus 5X/*" }, { ua: "Nexus 5X" }],
                      dpi: [422, 419.9],
                      bw: 3,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [{ mdmh: "LGE/*/LGMS345/*" }, { ua: "LGMS345" }],
                      dpi: [221.7, 219.1],
                      bw: 3,
                      ac: 500,
                    },
                    {
                      type: "android",
                      rules: [{ mdmh: "LGE/*/LG-D800/*" }, { ua: "LG-D800" }],
                      dpi: [422, 424.1],
                      bw: 3,
                      ac: 500,
                    },
                    {
                      type: "android",
                      rules: [{ mdmh: "LGE/*/LG-D850/*" }, { ua: "LG-D850" }],
                      dpi: [537.9, 541.9],
                      bw: 3,
                      ac: 500,
                    },
                    {
                      type: "android",
                      rules: [{ mdmh: "LGE/*/VS985 4G/*" }, { ua: "VS985 4G" }],
                      dpi: [537.9, 535.6],
                      bw: 3,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [{ mdmh: "LGE/*/Nexus 5/*" }, { ua: "Nexus 5 B" }],
                      dpi: [442.4, 444.8],
                      bw: 3,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [{ mdmh: "LGE/*/Nexus 4/*" }, { ua: "Nexus 4" }],
                      dpi: [319.8, 318.4],
                      bw: 3,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [{ mdmh: "LGE/*/LG-P769/*" }, { ua: "LG-P769" }],
                      dpi: [240.6, 247.5],
                      bw: 3,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [{ mdmh: "LGE/*/LGMS323/*" }, { ua: "LGMS323" }],
                      dpi: [206.6, 204.6],
                      bw: 3,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [{ mdmh: "LGE/*/LGLS996/*" }, { ua: "LGLS996" }],
                      dpi: [403.4, 401.5],
                      bw: 3,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "Micromax/*/4560MMX/*" },
                        { ua: "4560MMX" },
                      ],
                      dpi: [240, 219.4],
                      bw: 3,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "Micromax/*/A250/*" },
                        { ua: "Micromax A250" },
                      ],
                      dpi: [480, 446.4],
                      bw: 3,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "Micromax/*/Micromax AQ4501/*" },
                        { ua: "Micromax AQ4501" },
                      ],
                      dpi: 240,
                      bw: 3,
                      ac: 500,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "motorola/*/G5/*" },
                        { ua: "Moto G (5) Plus" },
                      ],
                      dpi: [403.4, 403],
                      bw: 3,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "motorola/*/DROID RAZR/*" },
                        { ua: "DROID RAZR" },
                      ],
                      dpi: [368.1, 256.7],
                      bw: 3,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "motorola/*/XT830C/*" },
                        { ua: "XT830C" },
                      ],
                      dpi: [254, 255.9],
                      bw: 3,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "motorola/*/XT1021/*" },
                        { ua: "XT1021" },
                      ],
                      dpi: [254, 256.7],
                      bw: 3,
                      ac: 500,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "motorola/*/XT1023/*" },
                        { ua: "XT1023" },
                      ],
                      dpi: [254, 256.7],
                      bw: 3,
                      ac: 500,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "motorola/*/XT1028/*" },
                        { ua: "XT1028" },
                      ],
                      dpi: [326.6, 327.6],
                      bw: 3,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "motorola/*/XT1034/*" },
                        { ua: "XT1034" },
                      ],
                      dpi: [326.6, 328.4],
                      bw: 3,
                      ac: 500,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "motorola/*/XT1053/*" },
                        { ua: "XT1053" },
                      ],
                      dpi: [315.3, 316.1],
                      bw: 3,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "motorola/*/XT1562/*" },
                        { ua: "XT1562" },
                      ],
                      dpi: [403.4, 402.7],
                      bw: 3,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "motorola/*/Nexus 6/*" },
                        { ua: "Nexus 6 B" },
                      ],
                      dpi: [494.3, 489.7],
                      bw: 3,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "motorola/*/XT1063/*" },
                        { ua: "XT1063" },
                      ],
                      dpi: [295, 296.6],
                      bw: 3,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "motorola/*/XT1064/*" },
                        { ua: "XT1064" },
                      ],
                      dpi: [295, 295.6],
                      bw: 3,
                      ac: 500,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "motorola/*/XT1092/*" },
                        { ua: "XT1092" },
                      ],
                      dpi: [422, 424.1],
                      bw: 3,
                      ac: 500,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "motorola/*/XT1095/*" },
                        { ua: "XT1095" },
                      ],
                      dpi: [422, 423.4],
                      bw: 3,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "motorola/*/G4/*" },
                        { ua: "Moto G (4)" },
                      ],
                      dpi: 401,
                      bw: 4,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [{ mdmh: "OnePlus/*/A0001/*" }, { ua: "A0001" }],
                      dpi: [403.4, 401],
                      bw: 3,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "OnePlus/*/ONE E1001/*" },
                        { ua: "ONE E1001" },
                      ],
                      dpi: [442.4, 441.4],
                      bw: 3,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "OnePlus/*/ONE E1003/*" },
                        { ua: "ONE E1003" },
                      ],
                      dpi: [442.4, 441.4],
                      bw: 3,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "OnePlus/*/ONE E1005/*" },
                        { ua: "ONE E1005" },
                      ],
                      dpi: [442.4, 441.4],
                      bw: 3,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "OnePlus/*/ONE A2001/*" },
                        { ua: "ONE A2001" },
                      ],
                      dpi: [391.9, 405.4],
                      bw: 3,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "OnePlus/*/ONE A2003/*" },
                        { ua: "ONE A2003" },
                      ],
                      dpi: [391.9, 405.4],
                      bw: 3,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "OnePlus/*/ONE A2005/*" },
                        { ua: "ONE A2005" },
                      ],
                      dpi: [391.9, 405.4],
                      bw: 3,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "OnePlus/*/ONEPLUS A3000/*" },
                        { ua: "ONEPLUS A3000" },
                      ],
                      dpi: 401,
                      bw: 3,
                      ac: 500,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "OnePlus/*/ONEPLUS A3003/*" },
                        { ua: "ONEPLUS A3003" },
                      ],
                      dpi: 401,
                      bw: 3,
                      ac: 500,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "OnePlus/*/ONEPLUS A3010/*" },
                        { ua: "ONEPLUS A3010" },
                      ],
                      dpi: 401,
                      bw: 3,
                      ac: 500,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "OnePlus/*/ONEPLUS A5000/*" },
                        { ua: "ONEPLUS A5000 " },
                      ],
                      dpi: [403.411, 399.737],
                      bw: 3,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "OnePlus/*/ONE A5010/*" },
                        { ua: "ONEPLUS A5010" },
                      ],
                      dpi: [403, 400],
                      bw: 2,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "OnePlus/*/ONEPLUS A6000/*" },
                        { ua: "ONEPLUS A6000" },
                      ],
                      dpi: 401,
                      bw: 3,
                      ac: 500,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "OnePlus/*/ONEPLUS A6003/*" },
                        { ua: "ONEPLUS A6003" },
                      ],
                      dpi: 401,
                      bw: 3,
                      ac: 500,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "OnePlus/*/ONEPLUS A6010/*" },
                        { ua: "ONEPLUS A6010" },
                      ],
                      dpi: 401,
                      bw: 2,
                      ac: 500,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "OnePlus/*/ONEPLUS A6013/*" },
                        { ua: "ONEPLUS A6013" },
                      ],
                      dpi: 401,
                      bw: 2,
                      ac: 500,
                    },
                    {
                      type: "android",
                      rules: [{ mdmh: "OPPO/*/X909/*" }, { ua: "X909" }],
                      dpi: [442.4, 444.1],
                      bw: 3,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "samsung/*/GT-I9082/*" },
                        { ua: "GT-I9082" },
                      ],
                      dpi: [184.7, 185.4],
                      bw: 3,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "samsung/*/SM-G360P/*" },
                        { ua: "SM-G360P" },
                      ],
                      dpi: [196.7, 205.4],
                      bw: 3,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "samsung/*/Nexus S/*" },
                        { ua: "Nexus S" },
                      ],
                      dpi: [234.5, 229.8],
                      bw: 3,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "samsung/*/GT-I9300/*" },
                        { ua: "GT-I9300" },
                      ],
                      dpi: [304.8, 303.9],
                      bw: 5,
                      ac: 500,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "samsung/*/SM-T230NU/*" },
                        { ua: "SM-T230NU" },
                      ],
                      dpi: 216,
                      bw: 3,
                      ac: 500,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "samsung/*/SGH-T399/*" },
                        { ua: "SGH-T399" },
                      ],
                      dpi: [217.7, 231.4],
                      bw: 3,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "samsung/*/SGH-M919/*" },
                        { ua: "SGH-M919" },
                      ],
                      dpi: [440.8, 437.7],
                      bw: 3,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "samsung/*/SM-N9005/*" },
                        { ua: "SM-N9005" },
                      ],
                      dpi: [386.4, 387],
                      bw: 3,
                      ac: 500,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "samsung/*/SAMSUNG-SM-N900A/*" },
                        { ua: "SAMSUNG-SM-N900A" },
                      ],
                      dpi: [386.4, 387.7],
                      bw: 3,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "samsung/*/GT-I9500/*" },
                        { ua: "GT-I9500" },
                      ],
                      dpi: [442.5, 443.3],
                      bw: 3,
                      ac: 500,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "samsung/*/GT-I9505/*" },
                        { ua: "GT-I9505" },
                      ],
                      dpi: 439.4,
                      bw: 4,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "samsung/*/SM-G900F/*" },
                        { ua: "SM-G900F" },
                      ],
                      dpi: [415.6, 431.6],
                      bw: 5,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "samsung/*/SM-G900M/*" },
                        { ua: "SM-G900M" },
                      ],
                      dpi: [415.6, 431.6],
                      bw: 5,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "samsung/*/SM-G800F/*" },
                        { ua: "SM-G800F" },
                      ],
                      dpi: 326.8,
                      bw: 3,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "samsung/*/SM-G906S/*" },
                        { ua: "SM-G906S" },
                      ],
                      dpi: [562.7, 572.4],
                      bw: 3,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "samsung/*/GT-I9300/*" },
                        { ua: "GT-I9300" },
                      ],
                      dpi: [306.7, 304.8],
                      bw: 5,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "samsung/*/SM-T535/*" },
                        { ua: "SM-T535" },
                      ],
                      dpi: [142.6, 136.4],
                      bw: 3,
                      ac: 500,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "samsung/*/SM-N920C/*" },
                        { ua: "SM-N920C" },
                      ],
                      dpi: [515.1, 518.4],
                      bw: 3,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "samsung/*/SM-N920P/*" },
                        { ua: "SM-N920P" },
                      ],
                      dpi: [386.3655, 390.144],
                      bw: 3,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "samsung/*/SM-N920W8/*" },
                        { ua: "SM-N920W8" },
                      ],
                      dpi: [515.1, 518.4],
                      bw: 3,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "samsung/*/GT-I9300I/*" },
                        { ua: "GT-I9300I" },
                      ],
                      dpi: [304.8, 305.8],
                      bw: 3,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "samsung/*/GT-I9195/*" },
                        { ua: "GT-I9195" },
                      ],
                      dpi: [249.4, 256.7],
                      bw: 3,
                      ac: 500,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "samsung/*/SPH-L520/*" },
                        { ua: "SPH-L520" },
                      ],
                      dpi: [249.4, 255.9],
                      bw: 3,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "samsung/*/SAMSUNG-SGH-I717/*" },
                        { ua: "SAMSUNG-SGH-I717" },
                      ],
                      dpi: 285.8,
                      bw: 3,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "samsung/*/SPH-D710/*" },
                        { ua: "SPH-D710" },
                      ],
                      dpi: [217.7, 204.2],
                      bw: 3,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "samsung/*/GT-N7100/*" },
                        { ua: "GT-N7100" },
                      ],
                      dpi: 265.1,
                      bw: 3,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "samsung/*/SCH-I605/*" },
                        { ua: "SCH-I605" },
                      ],
                      dpi: 265.1,
                      bw: 3,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "samsung/*/Galaxy Nexus/*" },
                        { ua: "Galaxy Nexus" },
                      ],
                      dpi: [315.3, 314.2],
                      bw: 3,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "samsung/*/SM-N910H/*" },
                        { ua: "SM-N910H" },
                      ],
                      dpi: [515.1, 518],
                      bw: 3,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "samsung/*/SM-N910C/*" },
                        { ua: "SM-N910C" },
                      ],
                      dpi: [515.2, 520.2],
                      bw: 3,
                      ac: 500,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "samsung/*/SM-G130M/*" },
                        { ua: "SM-G130M" },
                      ],
                      dpi: [165.9, 164.8],
                      bw: 3,
                      ac: 500,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "samsung/*/SM-G928I/*" },
                        { ua: "SM-G928I" },
                      ],
                      dpi: [515.1, 518.4],
                      bw: 3,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "samsung/*/SM-G920F/*" },
                        { ua: "SM-G920F" },
                      ],
                      dpi: 580.6,
                      bw: 3,
                      ac: 500,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "samsung/*/SM-G920P/*" },
                        { ua: "SM-G920P" },
                      ],
                      dpi: [522.5, 577],
                      bw: 3,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "samsung/*/SM-G925F/*" },
                        { ua: "SM-G925F" },
                      ],
                      dpi: 580.6,
                      bw: 3,
                      ac: 500,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "samsung/*/SM-G925V/*" },
                        { ua: "SM-G925V" },
                      ],
                      dpi: [522.5, 576.6],
                      bw: 3,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "samsung/*/SM-G930F/*" },
                        { ua: "SM-G930F" },
                      ],
                      dpi: 576.6,
                      bw: 3,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "samsung/*/SM-G935F/*" },
                        { ua: "SM-G935F" },
                      ],
                      dpi: 533,
                      bw: 3,
                      ac: 500,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "samsung/*/SM-G950F/*" },
                        { ua: "SM-G950F" },
                      ],
                      dpi: [562.707, 565.293],
                      bw: 3,
                      ac: 500,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "samsung/*/SM-G955U/*" },
                        { ua: "SM-G955U" },
                      ],
                      dpi: [522.514, 525.762],
                      bw: 3,
                      ac: 500,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "samsung/*/SM-G955F/*" },
                        { ua: "SM-G955F" },
                      ],
                      dpi: [522.514, 525.762],
                      bw: 3,
                      ac: 500,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "samsung/*/SM-G960F/*" },
                        { ua: "SM-G960F" },
                      ],
                      dpi: [569.575, 571.5],
                      bw: 3,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "samsung/*/SM-G9600/*" },
                        { ua: "SM-G9600" },
                      ],
                      dpi: [569.575, 571.5],
                      bw: 3,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "samsung/*/SM-G960T/*" },
                        { ua: "SM-G960T" },
                      ],
                      dpi: [569.575, 571.5],
                      bw: 3,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "samsung/*/SM-G960N/*" },
                        { ua: "SM-G960N" },
                      ],
                      dpi: [569.575, 571.5],
                      bw: 3,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "samsung/*/SM-G960U/*" },
                        { ua: "SM-G960U" },
                      ],
                      dpi: [569.575, 571.5],
                      bw: 3,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "samsung/*/SM-G9608/*" },
                        { ua: "SM-G9608" },
                      ],
                      dpi: [569.575, 571.5],
                      bw: 3,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "samsung/*/SM-G960FD/*" },
                        { ua: "SM-G960FD" },
                      ],
                      dpi: [569.575, 571.5],
                      bw: 3,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "samsung/*/SM-G960W/*" },
                        { ua: "SM-G960W" },
                      ],
                      dpi: [569.575, 571.5],
                      bw: 3,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "samsung/*/SM-G965F/*" },
                        { ua: "SM-G965F" },
                      ],
                      dpi: 529,
                      bw: 2,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [{ mdmh: "Sony/*/C6903/*" }, { ua: "C6903" }],
                      dpi: [442.5, 443.3],
                      bw: 3,
                      ac: 500,
                    },
                    {
                      type: "android",
                      rules: [{ mdmh: "Sony/*/D6653/*" }, { ua: "D6653" }],
                      dpi: [428.6, 427.6],
                      bw: 3,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [{ mdmh: "Sony/*/E6653/*" }, { ua: "E6653" }],
                      dpi: [428.6, 425.7],
                      bw: 3,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [{ mdmh: "Sony/*/E6853/*" }, { ua: "E6853" }],
                      dpi: [403.4, 401.9],
                      bw: 3,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [{ mdmh: "Sony/*/SGP321/*" }, { ua: "SGP321" }],
                      dpi: [224.7, 224.1],
                      bw: 3,
                      ac: 500,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "TCT/*/ALCATEL ONE TOUCH Fierce/*" },
                        { ua: "ALCATEL ONE TOUCH Fierce" },
                      ],
                      dpi: [240, 247.5],
                      bw: 3,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [{ mdmh: "THL/*/thl 5000/*" }, { ua: "thl 5000" }],
                      dpi: [480, 443.3],
                      bw: 3,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [{ mdmh: "Fly/*/IQ4412/*" }, { ua: "IQ4412" }],
                      dpi: 307.9,
                      bw: 3,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "ZTE/*/ZTE Blade L2/*" },
                        { ua: "ZTE Blade L2" },
                      ],
                      dpi: 240,
                      bw: 3,
                      ac: 500,
                    },
                    {
                      type: "android",
                      rules: [{ mdmh: "BENEVE/*/VR518/*" }, { ua: "VR518" }],
                      dpi: 480,
                      bw: 3,
                      ac: 500,
                    },
                    {
                      type: "ios",
                      rules: [{ res: [640, 960] }],
                      dpi: [325.1, 328.4],
                      bw: 4,
                      ac: 1e3,
                    },
                    {
                      type: "ios",
                      rules: [{ res: [640, 1136] }],
                      dpi: [317.1, 320.2],
                      bw: 3,
                      ac: 1e3,
                    },
                    {
                      type: "ios",
                      rules: [{ res: [750, 1334] }],
                      dpi: 326.4,
                      bw: 4,
                      ac: 1e3,
                    },
                    {
                      type: "ios",
                      rules: [{ res: [1242, 2208] }],
                      dpi: [453.6, 458.4],
                      bw: 4,
                      ac: 1e3,
                    },
                    {
                      type: "ios",
                      rules: [{ res: [1125, 2001] }],
                      dpi: [410.9, 415.4],
                      bw: 4,
                      ac: 1e3,
                    },
                    {
                      type: "ios",
                      rules: [{ res: [1125, 2436] }],
                      dpi: 458,
                      bw: 4,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "Huawei/*/EML-L29/*" },
                        { ua: "EML-L29" },
                      ],
                      dpi: 428,
                      bw: 3.45,
                      ac: 500,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "Nokia/*/Nokia 7.1/*" },
                        { ua: "Nokia 7.1" },
                      ],
                      dpi: [432, 431.9],
                      bw: 3,
                      ac: 500,
                    },
                    {
                      type: "ios",
                      rules: [{ res: [1242, 2688] }],
                      dpi: 458,
                      bw: 4,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "samsung/*/SM-G570M/*" },
                        { ua: "SM-G570M" },
                      ],
                      dpi: 320,
                      bw: 3.684,
                      ac: 1e3,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "samsung/*/SM-G970F/*" },
                        { ua: "SM-G970F" },
                      ],
                      dpi: 438,
                      bw: 2.281,
                      ac: 500,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "samsung/*/SM-G973F/*" },
                        { ua: "SM-G973F" },
                      ],
                      dpi: 550,
                      bw: 2.002,
                      ac: 500,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "samsung/*/SM-G975F/*" },
                        { ua: "SM-G975F" },
                      ],
                      dpi: 522,
                      bw: 2.054,
                      ac: 500,
                    },
                    {
                      type: "android",
                      rules: [
                        { mdmh: "samsung/*/SM-G977F/*" },
                        { ua: "SM-G977F" },
                      ],
                      dpi: 505,
                      bw: 2.334,
                      ac: 500,
                    },
                    {
                      type: "ios",
                      rules: [{ res: [828, 1792] }],
                      dpi: 326,
                      bw: 5,
                      ac: 500,
                    },
                  ],
                };
                function ge(e, t) {
                  if (((this.dpdb = me), this.recalculateDeviceParams_(), e)) {
                    this.onDeviceParamsUpdated = t;
                    var i = new XMLHttpRequest(),
                      r = this;
                    i.open("GET", e, !0),
                      i.addEventListener("load", function () {
                        (r.loading = !1),
                          i.status >= 200 && i.status <= 299
                            ? ((r.dpdb = JSON.parse(i.response)),
                              r.recalculateDeviceParams_())
                            : console.error("Error loading online DPDB!");
                      }),
                      i.send();
                  }
                }
                function ve(e) {
                  (this.xdpi = e.xdpi),
                    (this.ydpi = e.ydpi),
                    (this.bevelMm = e.bevelMm);
                }
                function we(e, t) {
                  this.set(e, t);
                }
                function ye(e, t) {
                  (this.kFilter = e),
                    (this.isDebug = t),
                    (this.currentAccelMeasurement = new we()),
                    (this.currentGyroMeasurement = new we()),
                    (this.previousGyroMeasurement = new we()),
                    h()
                      ? (this.filterQ = new le(-1, 0, 0, 1))
                      : (this.filterQ = new le(1, 0, 0, 1)),
                    (this.previousFilterQ = new le()),
                    this.previousFilterQ.copy(this.filterQ),
                    (this.accelQ = new le()),
                    (this.isOrientationInitialized = !1),
                    (this.estimatedGravity = new se()),
                    (this.measuredGravity = new se()),
                    (this.gyroIntegralQ = new le());
                }
                function Ee(e, t) {
                  (this.predictionTimeS = e),
                    (this.isDebug = t),
                    (this.previousQ = new le()),
                    (this.previousTimestampS = null),
                    (this.deltaQ = new le()),
                    (this.outQ = new le());
                }
                function be(e, t, i, r) {
                  (this.yawOnly = i),
                    (this.accelerometer = new se()),
                    (this.gyroscope = new se()),
                    (this.filter = new ye(e, r)),
                    (this.posePredictor = new Ee(t, r)),
                    (this.isFirefoxAndroid = p()),
                    (this.isIOS = h());
                  var n = f();
                  (this.isDeviceMotionInRadians = !this.isIOS && n && n < 66),
                    (this.isWithoutDeviceMotion = g() || m()),
                    (this.filterToWorldQ = new le()),
                    h()
                      ? this.filterToWorldQ.setFromAxisAngle(
                          new se(1, 0, 0),
                          Math.PI / 2
                        )
                      : this.filterToWorldQ.setFromAxisAngle(
                          new se(1, 0, 0),
                          -Math.PI / 2
                        ),
                    (this.inverseWorldToScreenQ = new le()),
                    (this.worldToScreenQ = new le()),
                    (this.originalPoseAdjustQ = new le()),
                    this.originalPoseAdjustQ.setFromAxisAngle(
                      new se(0, 0, 1),
                      (-window.orientation * Math.PI) / 180
                    ),
                    this.setScreenTransform_(),
                    w() &&
                      this.filterToWorldQ.multiply(this.inverseWorldToScreenQ),
                    (this.resetQ = new le()),
                    (this.orientationOut_ = new Float32Array(4)),
                    this.start();
                }
                (ge.prototype.getDeviceParams = function () {
                  return this.deviceParams;
                }),
                  (ge.prototype.recalculateDeviceParams_ = function () {
                    var e = this.calcDeviceParams_();
                    e
                      ? ((this.deviceParams = e),
                        this.onDeviceParamsUpdated &&
                          this.onDeviceParamsUpdated(this.deviceParams))
                      : console.error(
                          "Failed to recalculate device parameters."
                        );
                  }),
                  (ge.prototype.calcDeviceParams_ = function () {
                    var e = this.dpdb;
                    if (!e) return console.error("DPDB not available."), null;
                    if (1 != e.format)
                      return (
                        console.error("DPDB has unexpected format version."),
                        null
                      );
                    if (!e.devices || !e.devices.length)
                      return (
                        console.error("DPDB does not have a devices section."),
                        null
                      );
                    var t =
                        navigator.userAgent || navigator.vendor || window.opera,
                      i = E(),
                      r = b();
                    if (!e.devices)
                      return (
                        console.error("DPDB has no devices section."), null
                      );
                    for (var n = 0; n < e.devices.length; n++) {
                      var s = e.devices[n];
                      if (s.rules)
                        if ("ios" == s.type || "android" == s.type) {
                          if (h() == ("ios" == s.type)) {
                            for (var a = !1, A = 0; A < s.rules.length; A++) {
                              var o = s.rules[A];
                              if (this.ruleMatches_(o, t, i, r)) {
                                a = !0;
                                break;
                              }
                            }
                            if (a)
                              return new ve({
                                xdpi: s.dpi[0] || s.dpi,
                                ydpi: s.dpi[1] || s.dpi,
                                bevelMm: s.bw,
                              });
                          }
                        } else
                          console.warn("Device[" + n + "] has invalid type.");
                      else
                        console.warn("Device[" + n + "] has no rules section.");
                    }
                    return console.warn("No DPDB device match."), null;
                  }),
                  (ge.prototype.ruleMatches_ = function (e, t, i, r) {
                    if (!e.ua && !e.res) return !1;
                    if (
                      (e.ua &&
                        "SM" === e.ua.substring(0, 2) &&
                        (e.ua = e.ua.substring(0, 7)),
                      e.ua && t.indexOf(e.ua) < 0)
                    )
                      return !1;
                    if (e.res) {
                      if (!e.res[0] || !e.res[1]) return !1;
                      var n = e.res[0],
                        s = e.res[1];
                      if (
                        Math.min(i, r) != Math.min(n, s) ||
                        Math.max(i, r) != Math.max(n, s)
                      )
                        return !1;
                    }
                    return !0;
                  }),
                  (we.prototype.set = function (e, t) {
                    (this.sample = e), (this.timestampS = t);
                  }),
                  (we.prototype.copy = function (e) {
                    this.set(e.sample, e.timestampS);
                  }),
                  (ye.prototype.addAccelMeasurement = function (e, t) {
                    this.currentAccelMeasurement.set(e, t);
                  }),
                  (ye.prototype.addGyroMeasurement = function (e, t) {
                    this.currentGyroMeasurement.set(e, t);
                    var i = t - this.previousGyroMeasurement.timestampS;
                    y(i) && this.run_(),
                      this.previousGyroMeasurement.copy(
                        this.currentGyroMeasurement
                      );
                  }),
                  (ye.prototype.run_ = function () {
                    if (!this.isOrientationInitialized)
                      return (
                        (this.accelQ = this.accelToQuaternion_(
                          this.currentAccelMeasurement.sample
                        )),
                        this.previousFilterQ.copy(this.accelQ),
                        void (this.isOrientationInitialized = !0)
                      );
                    var e =
                        this.currentGyroMeasurement.timestampS -
                        this.previousGyroMeasurement.timestampS,
                      t = this.gyroToQuaternionDelta_(
                        this.currentGyroMeasurement.sample,
                        e
                      );
                    this.gyroIntegralQ.multiply(t),
                      this.filterQ.copy(this.previousFilterQ),
                      this.filterQ.multiply(t);
                    var i = new le();
                    i.copy(this.filterQ),
                      i.inverse(),
                      this.estimatedGravity.set(0, 0, -1),
                      this.estimatedGravity.applyQuaternion(i),
                      this.estimatedGravity.normalize(),
                      this.measuredGravity.copy(
                        this.currentAccelMeasurement.sample
                      ),
                      this.measuredGravity.normalize();
                    var r = new le();
                    r.setFromUnitVectors(
                      this.estimatedGravity,
                      this.measuredGravity
                    ),
                      r.inverse(),
                      this.isDebug &&
                        console.log(
                          "Delta: %d deg, G_est: (%s, %s, %s), G_meas: (%s, %s, %s)",
                          ne * P(r),
                          this.estimatedGravity.x.toFixed(1),
                          this.estimatedGravity.y.toFixed(1),
                          this.estimatedGravity.z.toFixed(1),
                          this.measuredGravity.x.toFixed(1),
                          this.measuredGravity.y.toFixed(1),
                          this.measuredGravity.z.toFixed(1)
                        );
                    var n = new le();
                    n.copy(this.filterQ),
                      n.multiply(r),
                      this.filterQ.slerp(n, 1 - this.kFilter),
                      this.previousFilterQ.copy(this.filterQ);
                  }),
                  (ye.prototype.getOrientation = function () {
                    return this.filterQ;
                  }),
                  (ye.prototype.accelToQuaternion_ = function (e) {
                    var t = new se();
                    t.copy(e), t.normalize();
                    var i = new le();
                    return (
                      i.setFromUnitVectors(new se(0, 0, -1), t), i.inverse(), i
                    );
                  }),
                  (ye.prototype.gyroToQuaternionDelta_ = function (e, t) {
                    var i = new le(),
                      r = new se();
                    return (
                      r.copy(e),
                      r.normalize(),
                      i.setFromAxisAngle(r, e.length() * t),
                      i
                    );
                  }),
                  (Ee.prototype.getPrediction = function (e, t, i) {
                    if (!this.previousTimestampS)
                      return (
                        this.previousQ.copy(e), (this.previousTimestampS = i), e
                      );
                    var r = new se();
                    r.copy(t), r.normalize();
                    var n = t.length();
                    if (n < 20 * re)
                      return (
                        this.isDebug &&
                          console.log(
                            "Moving slowly, at %s deg/s: no prediction",
                            (ne * n).toFixed(1)
                          ),
                        this.outQ.copy(e),
                        this.previousQ.copy(e),
                        this.outQ
                      );
                    var s = n * this.predictionTimeS;
                    return (
                      this.deltaQ.setFromAxisAngle(r, s),
                      this.outQ.copy(this.previousQ),
                      this.outQ.multiply(this.deltaQ),
                      this.previousQ.copy(e),
                      (this.previousTimestampS = i),
                      this.outQ
                    );
                  }),
                  (be.prototype.getPosition = function () {
                    return null;
                  }),
                  (be.prototype.getOrientation = function () {
                    var e = void 0;
                    if (this.isWithoutDeviceMotion && this._deviceOrientationQ)
                      return (
                        (this.deviceOrientationFixQ =
                          this.deviceOrientationFixQ ||
                          ((i = new le().setFromAxisAngle(new se(0, 0, -1), 0)),
                          (r = new le()),
                          -90 === window.orientation
                            ? r.setFromAxisAngle(new se(0, 1, 0), Math.PI / -2)
                            : r.setFromAxisAngle(new se(0, 1, 0), Math.PI / 2),
                          i.multiply(r))),
                        (this.deviceOrientationFilterToWorldQ =
                          this.deviceOrientationFilterToWorldQ ||
                          ((t = new le()).setFromAxisAngle(
                            new se(1, 0, 0),
                            -Math.PI / 2
                          ),
                          t)),
                        (e = this._deviceOrientationQ),
                        (n = new le()).copy(e),
                        n.multiply(this.deviceOrientationFilterToWorldQ),
                        n.multiply(this.resetQ),
                        n.multiply(this.worldToScreenQ),
                        n.multiplyQuaternions(this.deviceOrientationFixQ, n),
                        this.yawOnly && ((n.x = 0), (n.z = 0), n.normalize()),
                        (this.orientationOut_[0] = n.x),
                        (this.orientationOut_[1] = n.y),
                        (this.orientationOut_[2] = n.z),
                        (this.orientationOut_[3] = n.w),
                        this.orientationOut_
                      );
                    var t,
                      i,
                      r,
                      n,
                      s = this.filter.getOrientation();
                    return (
                      (e = this.posePredictor.getPrediction(
                        s,
                        this.gyroscope,
                        this.previousTimestampS
                      )),
                      (n = new le()).copy(this.filterToWorldQ),
                      n.multiply(this.resetQ),
                      n.multiply(e),
                      n.multiply(this.worldToScreenQ),
                      this.yawOnly && ((n.x = 0), (n.z = 0), n.normalize()),
                      (this.orientationOut_[0] = n.x),
                      (this.orientationOut_[1] = n.y),
                      (this.orientationOut_[2] = n.z),
                      (this.orientationOut_[3] = n.w),
                      this.orientationOut_
                    );
                  }),
                  (be.prototype.resetPose = function () {
                    this.resetQ.copy(this.filter.getOrientation()),
                      (this.resetQ.x = 0),
                      (this.resetQ.y = 0),
                      (this.resetQ.z *= -1),
                      this.resetQ.normalize(),
                      w() && this.resetQ.multiply(this.inverseWorldToScreenQ),
                      this.resetQ.multiply(this.originalPoseAdjustQ);
                  }),
                  (be.prototype.onDeviceOrientation_ = function (e) {
                    this._deviceOrientationQ =
                      this._deviceOrientationQ || new le();
                    var t = e.alpha,
                      i = e.beta,
                      r = e.gamma;
                    (t = ((t || 0) * Math.PI) / 180),
                      (i = ((i || 0) * Math.PI) / 180),
                      (r = ((r || 0) * Math.PI) / 180),
                      this._deviceOrientationQ.setFromEulerYXZ(i, t, -r);
                  }),
                  (be.prototype.onDeviceMotion_ = function (e) {
                    this.updateDeviceMotion_(e);
                  }),
                  (be.prototype.updateDeviceMotion_ = function (e) {
                    var t = e.accelerationIncludingGravity,
                      i = e.rotationRate,
                      r = e.timeStamp / 1e3,
                      n = r - this.previousTimestampS;
                    return n < 0
                      ? (N(
                          "fusion-pose-sensor:invalid:non-monotonic",
                          "Invalid timestamps detected: non-monotonic timestamp from devicemotion"
                        ),
                        void (this.previousTimestampS = r))
                      : n <= A || n > o
                      ? (N(
                          "fusion-pose-sensor:invalid:outside-threshold",
                          "Invalid timestamps detected: Timestamp from devicemotion outside expected range."
                        ),
                        void (this.previousTimestampS = r))
                      : (this.accelerometer.set(-t.x, -t.y, -t.z),
                        i &&
                          (v()
                            ? this.gyroscope.set(-i.beta, i.alpha, i.gamma)
                            : this.gyroscope.set(i.alpha, i.beta, i.gamma),
                          this.isDeviceMotionInRadians ||
                            this.gyroscope.multiplyScalar(Math.PI / 180),
                          this.filter.addGyroMeasurement(this.gyroscope, r)),
                        this.filter.addAccelMeasurement(this.accelerometer, r),
                        void (this.previousTimestampS = r));
                  }),
                  (be.prototype.onOrientationChange_ = function (e) {
                    this.setScreenTransform_();
                  }),
                  (be.prototype.onMessage_ = function (e) {
                    var t = e.data;
                    t &&
                      t.type &&
                      "devicemotion" === t.type.toLowerCase() &&
                      this.updateDeviceMotion_(t.deviceMotionEvent);
                  }),
                  (be.prototype.setScreenTransform_ = function () {
                    switch (
                      (this.worldToScreenQ.set(0, 0, 0, 1), window.orientation)
                    ) {
                      case 0:
                        break;
                      case 90:
                        this.worldToScreenQ.setFromAxisAngle(
                          new se(0, 0, 1),
                          -Math.PI / 2
                        );
                        break;
                      case -90:
                        this.worldToScreenQ.setFromAxisAngle(
                          new se(0, 0, 1),
                          Math.PI / 2
                        );
                    }
                    this.inverseWorldToScreenQ.copy(this.worldToScreenQ),
                      this.inverseWorldToScreenQ.inverse();
                  }),
                  (be.prototype.start = function () {
                    (this.onDeviceMotionCallback_ =
                      this.onDeviceMotion_.bind(this)),
                      (this.onOrientationChangeCallback_ =
                        this.onOrientationChange_.bind(this)),
                      (this.onMessageCallback_ = this.onMessage_.bind(this)),
                      (this.onDeviceOrientationCallback_ =
                        this.onDeviceOrientation_.bind(this)),
                      h() &&
                        x() &&
                        window.addEventListener(
                          "message",
                          this.onMessageCallback_
                        ),
                      window.addEventListener(
                        "orientationchange",
                        this.onOrientationChangeCallback_
                      ),
                      this.isWithoutDeviceMotion
                        ? window.addEventListener(
                            "deviceorientation",
                            this.onDeviceOrientationCallback_
                          )
                        : window.addEventListener(
                            "devicemotion",
                            this.onDeviceMotionCallback_
                          );
                  }),
                  (be.prototype.stop = function () {
                    window.removeEventListener(
                      "devicemotion",
                      this.onDeviceMotionCallback_
                    ),
                      window.removeEventListener(
                        "deviceorientation",
                        this.onDeviceOrientationCallback_
                      ),
                      window.removeEventListener(
                        "orientationchange",
                        this.onOrientationChangeCallback_
                      ),
                      window.removeEventListener(
                        "message",
                        this.onMessageCallback_
                      );
                  });
                var _e = 60,
                  De = new se(1, 0, 0),
                  Me = new se(0, 0, 1),
                  Fe = new le();
                Fe.setFromAxisAngle(De, -Math.PI / 2),
                  Fe.multiply(new le().setFromAxisAngle(Me, Math.PI / 2));
                var Te = (function () {
                    function e(t) {
                      n(this, e),
                        (this.config = t),
                        (this.sensor = null),
                        (this.fusionSensor = null),
                        (this._out = new Float32Array(4)),
                        (this.api = null),
                        (this.errors = []),
                        (this._sensorQ = new le()),
                        (this._outQ = new le()),
                        (this._onSensorRead = this._onSensorRead.bind(this)),
                        (this._onSensorError = this._onSensorError.bind(this)),
                        this.init();
                    }
                    return (
                      s(e, [
                        {
                          key: "init",
                          value: function () {
                            var e = null;
                            try {
                              (e = new RelativeOrientationSensor({
                                frequency: _e,
                                referenceFrame: "screen",
                              })).addEventListener(
                                "error",
                                this._onSensorError
                              );
                            } catch (e) {
                              this.errors.push(e),
                                "SecurityError" === e.name
                                  ? (console.error(
                                      "Cannot construct sensors due to the Feature Policy"
                                    ),
                                    console.warn(
                                      'Attempting to fall back using "devicemotion"; however this will fail in the future without correct permissions.'
                                    ),
                                    this.useDeviceMotion())
                                  : "ReferenceError" === e.name
                                  ? this.useDeviceMotion()
                                  : console.error(e);
                            }
                            e &&
                              ((this.api = "sensor"),
                              (this.sensor = e),
                              this.sensor.addEventListener(
                                "reading",
                                this._onSensorRead
                              ),
                              this.sensor.start());
                          },
                        },
                        {
                          key: "useDeviceMotion",
                          value: function () {
                            (this.api = "devicemotion"),
                              (this.fusionSensor = new be(
                                this.config.K_FILTER,
                                this.config.PREDICTION_TIME_S,
                                this.config.YAW_ONLY,
                                this.config.DEBUG
                              )),
                              this.sensor &&
                                (this.sensor.removeEventListener(
                                  "reading",
                                  this._onSensorRead
                                ),
                                this.sensor.removeEventListener(
                                  "error",
                                  this._onSensorError
                                ),
                                (this.sensor = null));
                          },
                        },
                        {
                          key: "getOrientation",
                          value: function () {
                            if (this.fusionSensor)
                              return this.fusionSensor.getOrientation();
                            if (!this.sensor || !this.sensor.quaternion)
                              return (
                                (this._out[0] =
                                  this._out[1] =
                                  this._out[2] =
                                    0),
                                (this._out[3] = 1),
                                this._out
                              );
                            var e = this.sensor.quaternion;
                            this._sensorQ.set(e[0], e[1], e[2], e[3]);
                            var t = this._outQ;
                            return (
                              t.copy(Fe),
                              t.multiply(this._sensorQ),
                              this.config.YAW_ONLY &&
                                ((t.x = t.z = 0), t.normalize()),
                              (this._out[0] = t.x),
                              (this._out[1] = t.y),
                              (this._out[2] = t.z),
                              (this._out[3] = t.w),
                              this._out
                            );
                          },
                        },
                        {
                          key: "_onSensorError",
                          value: function (e) {
                            this.errors.push(e.error),
                              "NotAllowedError" === e.error.name
                                ? console.error(
                                    "Permission to access sensor was denied"
                                  )
                                : "NotReadableError" === e.error.name
                                ? console.error("Sensor could not be read")
                                : console.error(e.error),
                              this.useDeviceMotion();
                          },
                        },
                        { key: "_onSensorRead", value: function () {} },
                      ]),
                      e
                    );
                  })(),
                  Be =
                    "<svg width='198' height='240' viewBox='0 0 198 240' xmlns='http://www.w3.org/2000/svg'><g fill='none' fill-rule='evenodd'><path d='M149.625 109.527l6.737 3.891v.886c0 .177.013.36.038.549.01.081.02.162.027.242.14 1.415.974 2.998 2.105 3.999l5.72 5.062.081-.09s4.382-2.53 5.235-3.024l25.97 14.993v54.001c0 .771-.386 1.217-.948 1.217-.233 0-.495-.076-.772-.236l-23.967-13.838-.014.024-27.322 15.775-.85-1.323c-4.731-1.529-9.748-2.74-14.951-3.61a.27.27 0 0 0-.007.024l-5.067 16.961-7.891 4.556-.037-.063v27.59c0 .772-.386 1.217-.948 1.217-.232 0-.495-.076-.772-.236l-42.473-24.522c-.95-.549-1.72-1.877-1.72-2.967v-1.035l-.021.047a5.111 5.111 0 0 0-1.816-.399 5.682 5.682 0 0 0-.546.001 13.724 13.724 0 0 1-1.918-.041c-1.655-.153-3.2-.6-4.404-1.296l-46.576-26.89.005.012-10.278-18.75c-1.001-1.827-.241-4.216 1.698-5.336l56.011-32.345a4.194 4.194 0 0 1 2.099-.572c1.326 0 2.572.659 3.227 1.853l.005-.003.227.413-.006.004a9.63 9.63 0 0 0 1.477 2.018l.277.27c1.914 1.85 4.468 2.801 7.113 2.801 1.949 0 3.948-.517 5.775-1.572.013 0 7.319-4.219 7.319-4.219a4.194 4.194 0 0 1 2.099-.572c1.326 0 2.572.658 3.226 1.853l3.25 5.928.022-.018 6.785 3.917-.105-.182 46.881-26.965m0-1.635c-.282 0-.563.073-.815.218l-46.169 26.556-5.41-3.124-3.005-5.481c-.913-1.667-2.699-2.702-4.66-2.703-1.011 0-2.02.274-2.917.792a3825 3825 0 0 1-7.275 4.195l-.044.024a9.937 9.937 0 0 1-4.957 1.353c-2.292 0-4.414-.832-5.976-2.342l-.252-.245a7.992 7.992 0 0 1-1.139-1.534 1.379 1.379 0 0 0-.06-.122l-.227-.414a1.718 1.718 0 0 0-.095-.154c-.938-1.574-2.673-2.545-4.571-2.545-1.011 0-2.02.274-2.917.792L3.125 155.502c-2.699 1.559-3.738 4.94-2.314 7.538l10.278 18.75c.177.323.448.563.761.704l46.426 26.804c1.403.81 3.157 1.332 5.072 1.508a15.661 15.661 0 0 0 2.146.046 4.766 4.766 0 0 1 .396 0c.096.004.19.011.283.022.109 1.593 1.159 3.323 2.529 4.114l42.472 24.522c.524.302 1.058.455 1.59.455 1.497 0 2.583-1.2 2.583-2.852v-26.562l7.111-4.105a1.64 1.64 0 0 0 .749-.948l4.658-15.593c4.414.797 8.692 1.848 12.742 3.128l.533.829a1.634 1.634 0 0 0 2.193.531l26.532-15.317L193 192.433c.523.302 1.058.455 1.59.455 1.497 0 2.583-1.199 2.583-2.852v-54.001c0-.584-.312-1.124-.818-1.416l-25.97-14.993a1.633 1.633 0 0 0-1.636.001c-.606.351-2.993 1.73-4.325 2.498l-4.809-4.255c-.819-.725-1.461-1.933-1.561-2.936a7.776 7.776 0 0 0-.033-.294 2.487 2.487 0 0 1-.023-.336v-.886c0-.584-.312-1.123-.817-1.416l-6.739-3.891a1.633 1.633 0 0 0-.817-.219' fill='#455A64'/><path d='M96.027 132.636l46.576 26.891c1.204.695 1.979 1.587 2.242 2.541l-.01.007-81.374 46.982h-.001c-1.654-.152-3.199-.6-4.403-1.295l-46.576-26.891 83.546-48.235' fill='#FAFAFA'/><path d='M63.461 209.174c-.008 0-.015 0-.022-.002-1.693-.156-3.228-.609-4.441-1.309l-46.576-26.89a.118.118 0 0 1 0-.203l83.546-48.235a.117.117 0 0 1 .117 0l46.576 26.891c1.227.708 2.021 1.612 2.296 2.611a.116.116 0 0 1-.042.124l-.021.016-81.375 46.981a.11.11 0 0 1-.058.016zm-50.747-28.303l46.401 26.79c1.178.68 2.671 1.121 4.32 1.276l81.272-46.922c-.279-.907-1.025-1.73-2.163-2.387l-46.517-26.857-83.313 48.1z' fill='#607D8B'/><path d='M148.327 165.471a5.85 5.85 0 0 1-.546.001c-1.894-.083-3.302-1.038-3.145-2.132a2.693 2.693 0 0 0-.072-1.105l-81.103 46.822c.628.058 1.272.073 1.918.042.182-.009.364-.009.546-.001 1.894.083 3.302 1.038 3.145 2.132l79.257-45.759' fill='#FFF'/><path d='M69.07 211.347a.118.118 0 0 1-.115-.134c.045-.317-.057-.637-.297-.925-.505-.61-1.555-1.022-2.738-1.074a5.966 5.966 0 0 0-.535.001 14.03 14.03 0 0 1-1.935-.041.117.117 0 0 1-.103-.092.116.116 0 0 1 .055-.126l81.104-46.822a.117.117 0 0 1 .171.07c.104.381.129.768.074 1.153-.045.316.057.637.296.925.506.61 1.555 1.021 2.739 1.073.178.008.357.008.535-.001a.117.117 0 0 1 .064.218l-79.256 45.759a.114.114 0 0 1-.059.016zm-3.405-2.372c.089 0 .177.002.265.006 1.266.056 2.353.488 2.908 1.158.227.274.35.575.36.882l78.685-45.429c-.036 0-.072-.001-.107-.003-1.267-.056-2.354-.489-2.909-1.158-.282-.34-.402-.724-.347-1.107a2.604 2.604 0 0 0-.032-.91L63.846 208.97a13.91 13.91 0 0 0 1.528.012c.097-.005.194-.007.291-.007z' fill='#607D8B'/><path d='M2.208 162.134c-1.001-1.827-.241-4.217 1.698-5.337l56.011-32.344c1.939-1.12 4.324-.546 5.326 1.281l.232.41a9.344 9.344 0 0 0 1.47 2.021l.278.27c3.325 3.214 8.583 3.716 12.888 1.23l7.319-4.22c1.94-1.119 4.324-.546 5.325 1.282l3.25 5.928-83.519 48.229-10.278-18.75z' fill='#FAFAFA'/><path d='M12.486 181.001a.112.112 0 0 1-.031-.005.114.114 0 0 1-.071-.056L2.106 162.19c-1.031-1.88-.249-4.345 1.742-5.494l56.01-32.344a4.328 4.328 0 0 1 2.158-.588c1.415 0 2.65.702 3.311 1.882.01.008.018.017.024.028l.227.414a.122.122 0 0 1 .013.038 9.508 9.508 0 0 0 1.439 1.959l.275.266c1.846 1.786 4.344 2.769 7.031 2.769 1.977 0 3.954-.538 5.717-1.557a.148.148 0 0 1 .035-.013l7.284-4.206a4.321 4.321 0 0 1 2.157-.588c1.427 0 2.672.716 3.329 1.914l3.249 5.929a.116.116 0 0 1-.044.157l-83.518 48.229a.116.116 0 0 1-.059.016zm49.53-57.004c-.704 0-1.41.193-2.041.557l-56.01 32.345c-1.882 1.086-2.624 3.409-1.655 5.179l10.221 18.645 83.317-48.112-3.195-5.829c-.615-1.122-1.783-1.792-3.124-1.792a4.08 4.08 0 0 0-2.04.557l-7.317 4.225a.148.148 0 0 1-.035.013 11.7 11.7 0 0 1-5.801 1.569c-2.748 0-5.303-1.007-7.194-2.835l-.278-.27a9.716 9.716 0 0 1-1.497-2.046.096.096 0 0 1-.013-.037l-.191-.347a.11.11 0 0 1-.023-.029c-.615-1.123-1.783-1.793-3.124-1.793z' fill='#607D8B'/><path d='M42.434 155.808c-2.51-.001-4.697-1.258-5.852-3.365-1.811-3.304-.438-7.634 3.059-9.654l12.291-7.098a7.599 7.599 0 0 1 3.789-1.033c2.51 0 4.697 1.258 5.852 3.365 1.811 3.304.439 7.634-3.059 9.654l-12.291 7.098a7.606 7.606 0 0 1-3.789 1.033zm13.287-20.683a7.128 7.128 0 0 0-3.555.971l-12.291 7.098c-3.279 1.893-4.573 5.942-2.883 9.024 1.071 1.955 3.106 3.122 5.442 3.122a7.13 7.13 0 0 0 3.556-.97l12.291-7.098c3.279-1.893 4.572-5.942 2.883-9.024-1.072-1.955-3.106-3.123-5.443-3.123z' fill='#607D8B'/><path d='M149.588 109.407l6.737 3.89v.887c0 .176.013.36.037.549.011.081.02.161.028.242.14 1.415.973 2.998 2.105 3.999l7.396 6.545c.177.156.358.295.541.415 1.579 1.04 2.95.466 3.062-1.282.049-.784.057-1.595.023-2.429l-.003-.16v-1.151l25.987 15.003v54c0 1.09-.77 1.53-1.72.982l-42.473-24.523c-.95-.548-1.72-1.877-1.72-2.966v-34.033' fill='#FAFAFA'/><path d='M194.553 191.25c-.257 0-.54-.085-.831-.253l-42.472-24.521c-.981-.567-1.779-1.943-1.779-3.068v-34.033h.234v34.033c0 1.051.745 2.336 1.661 2.866l42.473 24.521c.424.245.816.288 1.103.122.285-.164.442-.52.442-1.002v-53.933l-25.753-14.868.003 1.106c.034.832.026 1.654-.024 2.439-.054.844-.396 1.464-.963 1.746-.619.309-1.45.173-2.28-.373a5.023 5.023 0 0 1-.553-.426l-7.397-6.544c-1.158-1.026-1.999-2.625-2.143-4.076a9.624 9.624 0 0 0-.027-.238 4.241 4.241 0 0 1-.038-.564v-.82l-6.68-3.856.117-.202 6.738 3.89.058.034v.954c0 .171.012.351.036.533.011.083.021.165.029.246.138 1.395.948 2.935 2.065 3.923l7.397 6.545c.173.153.35.289.527.406.758.499 1.504.63 2.047.359.49-.243.786-.795.834-1.551.05-.778.057-1.591.024-2.417l-.004-.163v-1.355l.175.1 25.987 15.004.059.033v54.068c0 .569-.198.996-.559 1.204a1.002 1.002 0 0 1-.506.131' fill='#607D8B'/><path d='M145.685 163.161l24.115 13.922-25.978 14.998-1.462-.307c-6.534-2.17-13.628-3.728-21.019-4.616-4.365-.524-8.663 1.096-9.598 3.62a2.746 2.746 0 0 0-.011 1.928c1.538 4.267 4.236 8.363 7.995 12.135l.532.845-25.977 14.997-24.115-13.922 75.518-43.6' fill='#FFF'/><path d='M94.282 220.818l-.059-.033-24.29-14.024.175-.101 75.577-43.634.058.033 24.29 14.024-26.191 15.122-.045-.01-1.461-.307c-6.549-2.174-13.613-3.725-21.009-4.614a13.744 13.744 0 0 0-1.638-.097c-3.758 0-7.054 1.531-7.837 3.642a2.62 2.62 0 0 0-.01 1.848c1.535 4.258 4.216 8.326 7.968 12.091l.016.021.526.835.006.01.064.102-.105.061-25.977 14.998-.058.033zm-23.881-14.057l23.881 13.788 24.802-14.32c.546-.315.846-.489 1.017-.575l-.466-.74c-3.771-3.787-6.467-7.881-8.013-12.168a2.851 2.851 0 0 1 .011-2.008c.815-2.199 4.203-3.795 8.056-3.795.557 0 1.117.033 1.666.099 7.412.891 14.491 2.445 21.041 4.621.836.175 1.215.254 1.39.304l25.78-14.884-23.881-13.788-75.284 43.466z' fill='#607D8B'/><path d='M167.23 125.979v50.871l-27.321 15.773-6.461-14.167c-.91-1.996-3.428-1.738-5.624.574a10.238 10.238 0 0 0-2.33 4.018l-6.46 21.628-27.322 15.774v-50.871l75.518-43.6' fill='#FFF'/><path d='M91.712 220.567a.127.127 0 0 1-.059-.016.118.118 0 0 1-.058-.101v-50.871c0-.042.023-.08.058-.101l75.519-43.6a.117.117 0 0 1 .175.101v50.871c0 .041-.023.08-.059.1l-27.321 15.775a.118.118 0 0 1-.094.01.12.12 0 0 1-.071-.063l-6.46-14.168c-.375-.822-1.062-1.275-1.934-1.275-1.089 0-2.364.686-3.5 1.881a10.206 10.206 0 0 0-2.302 3.972l-6.46 21.627a.118.118 0 0 1-.054.068L91.77 220.551a.12.12 0 0 1-.058.016zm.117-50.92v50.601l27.106-15.65 6.447-21.583a10.286 10.286 0 0 1 2.357-4.065c1.18-1.242 2.517-1.954 3.669-1.954.969 0 1.731.501 2.146 1.411l6.407 14.051 27.152-15.676v-50.601l-75.284 43.466z' fill='#607D8B'/><path d='M168.543 126.213v50.87l-27.322 15.774-6.46-14.168c-.91-1.995-3.428-1.738-5.624.574a10.248 10.248 0 0 0-2.33 4.019l-6.461 21.627-27.321 15.774v-50.87l75.518-43.6' fill='#FFF'/><path d='M93.025 220.8a.123.123 0 0 1-.059-.015.12.12 0 0 1-.058-.101v-50.871c0-.042.023-.08.058-.101l75.518-43.6a.112.112 0 0 1 .117 0c.036.02.059.059.059.1v50.871a.116.116 0 0 1-.059.101l-27.321 15.774a.111.111 0 0 1-.094.01.115.115 0 0 1-.071-.062l-6.46-14.168c-.375-.823-1.062-1.275-1.935-1.275-1.088 0-2.363.685-3.499 1.881a10.19 10.19 0 0 0-2.302 3.971l-6.461 21.628a.108.108 0 0 1-.053.067l-27.322 15.775a.12.12 0 0 1-.058.015zm.117-50.919v50.6l27.106-15.649 6.447-21.584a10.293 10.293 0 0 1 2.357-4.065c1.179-1.241 2.516-1.954 3.668-1.954.969 0 1.732.502 2.147 1.412l6.407 14.051 27.152-15.676v-50.601l-75.284 43.466z' fill='#607D8B'/><path d='M169.8 177.083l-27.322 15.774-6.46-14.168c-.91-1.995-3.428-1.738-5.625.574a10.246 10.246 0 0 0-2.329 4.019l-6.461 21.627-27.321 15.774v-50.87l75.518-43.6v50.87z' fill='#FAFAFA'/><path d='M94.282 220.917a.234.234 0 0 1-.234-.233v-50.871c0-.083.045-.161.117-.202l75.518-43.601a.234.234 0 1 1 .35.202v50.871a.233.233 0 0 1-.116.202l-27.322 15.775a.232.232 0 0 1-.329-.106l-6.461-14.168c-.36-.789-.992-1.206-1.828-1.206-1.056 0-2.301.672-3.415 1.844a10.099 10.099 0 0 0-2.275 3.924l-6.46 21.628a.235.235 0 0 1-.107.136l-27.322 15.774a.23.23 0 0 1-.116.031zm.233-50.969v50.331l26.891-15.525 6.434-21.539a10.41 10.41 0 0 1 2.384-4.112c1.201-1.265 2.569-1.991 3.753-1.991 1.018 0 1.818.526 2.253 1.48l6.354 13.934 26.982-15.578v-50.331l-75.051 43.331z' fill='#607D8B'/><path d='M109.894 199.943c-1.774 0-3.241-.725-4.244-2.12a.224.224 0 0 1 .023-.294.233.233 0 0 1 .301-.023c.78.547 1.705.827 2.75.827 1.323 0 2.754-.439 4.256-1.306 5.311-3.067 9.631-10.518 9.631-16.611 0-1.927-.442-3.56-1.278-4.724a.232.232 0 0 1 .323-.327c1.671 1.172 2.591 3.381 2.591 6.219 0 6.242-4.426 13.863-9.865 17.003-1.574.908-3.084 1.356-4.488 1.356zm-2.969-1.542c.813.651 1.82.877 2.968.877h.001c1.321 0 2.753-.327 4.254-1.194 5.311-3.067 9.632-10.463 9.632-16.556 0-1.979-.463-3.599-1.326-4.761.411 1.035.625 2.275.625 3.635 0 6.243-4.426 13.883-9.865 17.023-1.574.909-3.084 1.317-4.49 1.317-.641 0-1.243-.149-1.799-.341z' fill='#607D8B'/><path d='M113.097 197.23c5.384-3.108 9.748-10.636 9.748-16.814 0-2.051-.483-3.692-1.323-4.86-1.784-1.252-4.374-1.194-7.257.47-5.384 3.108-9.748 10.636-9.748 16.814 0 2.051.483 3.692 1.323 4.86 1.784 1.252 4.374 1.194 7.257-.47' fill='#FAFAFA'/><path d='M108.724 198.614c-1.142 0-2.158-.213-3.019-.817-.021-.014-.04.014-.055-.007-.894-1.244-1.367-2.948-1.367-4.973 0-6.242 4.426-13.864 9.865-17.005 1.574-.908 3.084-1.363 4.49-1.363 1.142 0 2.158.309 3.018.913a.23.23 0 0 1 .056.056c.894 1.244 1.367 2.972 1.367 4.997 0 6.243-4.426 13.783-9.865 16.923-1.574.909-3.084 1.276-4.49 1.276zm-2.718-1.109c.774.532 1.688.776 2.718.776 1.323 0 2.754-.413 4.256-1.28 5.311-3.066 9.631-10.505 9.631-16.598 0-1.909-.434-3.523-1.255-4.685-.774-.533-1.688-.799-2.718-.799-1.323 0-2.755.441-4.256 1.308-5.311 3.066-9.631 10.506-9.631 16.599 0 1.909.434 3.517 1.255 4.679z' fill='#607D8B'/><path d='M149.318 114.262l-9.984 8.878 15.893 11.031 5.589-6.112-11.498-13.797' fill='#FAFAFA'/><path d='M169.676 120.84l-9.748 5.627c-3.642 2.103-9.528 2.113-13.147.024-3.62-2.089-3.601-5.488.041-7.591l9.495-5.608-6.729-3.885-81.836 47.071 45.923 26.514 3.081-1.779c.631-.365.869-.898.618-1.39-2.357-4.632-2.593-9.546-.683-14.262 5.638-13.92 24.509-24.815 48.618-28.07 8.169-1.103 16.68-.967 24.704.394.852.145 1.776.008 2.407-.357l3.081-1.778-25.825-14.91' fill='#FAFAFA'/><path d='M113.675 183.459a.47.47 0 0 1-.233-.062l-45.924-26.515a.468.468 0 0 1 .001-.809l81.836-47.071a.467.467 0 0 1 .466 0l6.729 3.885a.467.467 0 0 1-.467.809l-6.496-3.75-80.9 46.533 44.988 25.973 2.848-1.644c.192-.111.62-.409.435-.773-2.416-4.748-2.658-9.814-.7-14.65 2.806-6.927 8.885-13.242 17.582-18.263 8.657-4.998 19.518-8.489 31.407-10.094 8.198-1.107 16.79-.97 24.844.397.739.125 1.561.007 2.095-.301l2.381-1.374-25.125-14.506a.467.467 0 0 1 .467-.809l25.825 14.91a.467.467 0 0 1 0 .809l-3.081 1.779c-.721.417-1.763.575-2.718.413-7.963-1.351-16.457-1.486-24.563-.392-11.77 1.589-22.512 5.039-31.065 9.977-8.514 4.916-14.456 11.073-17.183 17.805-1.854 4.578-1.623 9.376.666 13.875.37.725.055 1.513-.8 2.006l-3.081 1.78a.476.476 0 0 1-.234.062' fill='#455A64'/><path d='M153.316 128.279c-2.413 0-4.821-.528-6.652-1.586-1.818-1.049-2.82-2.461-2.82-3.975 0-1.527 1.016-2.955 2.861-4.02l9.493-5.607a.233.233 0 1 1 .238.402l-9.496 5.609c-1.696.979-2.628 2.263-2.628 3.616 0 1.34.918 2.608 2.585 3.571 3.549 2.049 9.343 2.038 12.914-.024l9.748-5.628a.234.234 0 0 1 .234.405l-9.748 5.628c-1.858 1.072-4.296 1.609-6.729 1.609' fill='#607D8B'/><path d='M113.675 182.992l-45.913-26.508M113.675 183.342a.346.346 0 0 1-.175-.047l-45.913-26.508a.35.35 0 1 1 .35-.607l45.913 26.508a.35.35 0 0 1-.175.654' fill='#455A64'/><path d='M67.762 156.484v54.001c0 1.09.77 2.418 1.72 2.967l42.473 24.521c.95.549 1.72.11 1.72-.98v-54.001' fill='#FAFAFA'/><path d='M112.727 238.561c-.297 0-.62-.095-.947-.285l-42.473-24.521c-1.063-.613-1.895-2.05-1.895-3.27v-54.001a.35.35 0 1 1 .701 0v54.001c0 .96.707 2.18 1.544 2.663l42.473 24.522c.344.198.661.243.87.122.206-.119.325-.411.325-.799v-54.001a.35.35 0 1 1 .7 0v54.001c0 .655-.239 1.154-.675 1.406a1.235 1.235 0 0 1-.623.162' fill='#455A64'/><path d='M112.86 147.512h-.001c-2.318 0-4.499-.522-6.142-1.471-1.705-.984-2.643-2.315-2.643-3.749 0-1.445.952-2.791 2.68-3.788l12.041-6.953c1.668-.962 3.874-1.493 6.212-1.493 2.318 0 4.499.523 6.143 1.472 1.704.984 2.643 2.315 2.643 3.748 0 1.446-.952 2.791-2.68 3.789l-12.042 6.952c-1.668.963-3.874 1.493-6.211 1.493zm12.147-16.753c-2.217 0-4.298.497-5.861 1.399l-12.042 6.952c-1.502.868-2.33 1.998-2.33 3.182 0 1.173.815 2.289 2.293 3.142 1.538.889 3.596 1.378 5.792 1.378h.001c2.216 0 4.298-.497 5.861-1.399l12.041-6.953c1.502-.867 2.33-1.997 2.33-3.182 0-1.172-.814-2.288-2.292-3.142-1.539-.888-3.596-1.377-5.793-1.377z' fill='#607D8B'/><path d='M165.63 123.219l-5.734 3.311c-3.167 1.828-8.286 1.837-11.433.02-3.147-1.817-3.131-4.772.036-6.601l5.734-3.31 11.397 6.58' fill='#FAFAFA'/><path d='M154.233 117.448l9.995 5.771-4.682 2.704c-1.434.827-3.352 1.283-5.399 1.283-2.029 0-3.923-.449-5.333-1.263-1.29-.744-2-1.694-2-2.674 0-.991.723-1.955 2.036-2.713l5.383-3.108m0-.809l-5.734 3.31c-3.167 1.829-3.183 4.784-.036 6.601 1.568.905 3.623 1.357 5.684 1.357 2.077 0 4.159-.46 5.749-1.377l5.734-3.311-11.397-6.58M145.445 179.667c-1.773 0-3.241-.85-4.243-2.245-.067-.092-.057-.275.023-.356.08-.081.207-.12.3-.055.781.548 1.706.812 2.751.811 1.322 0 2.754-.446 4.256-1.313 5.31-3.066 9.631-10.522 9.631-16.615 0-1.927-.442-3.562-1.279-4.726a.235.235 0 0 1 .024-.301.232.232 0 0 1 .3-.027c1.67 1.172 2.59 3.38 2.59 6.219 0 6.242-4.425 13.987-9.865 17.127-1.573.908-3.083 1.481-4.488 1.481zM142.476 178c.814.651 1.82 1.002 2.969 1.002 1.322 0 2.753-.452 4.255-1.32 5.31-3.065 9.631-10.523 9.631-16.617 0-1.98-.463-3.63-1.325-4.793.411 1.035.624 2.26.624 3.62 0 6.242-4.425 13.875-9.865 17.015-1.573.909-3.084 1.376-4.489 1.376a5.49 5.49 0 0 1-1.8-.283z' fill='#607D8B'/><path d='M148.648 176.704c5.384-3.108 9.748-10.636 9.748-16.813 0-2.052-.483-3.693-1.322-4.861-1.785-1.252-4.375-1.194-7.258.471-5.383 3.108-9.748 10.636-9.748 16.813 0 2.051.484 3.692 1.323 4.86 1.785 1.253 4.374 1.195 7.257-.47' fill='#FAFAFA'/><path d='M144.276 178.276c-1.143 0-2.158-.307-3.019-.911a.217.217 0 0 1-.055-.054c-.895-1.244-1.367-2.972-1.367-4.997 0-6.241 4.425-13.875 9.865-17.016 1.573-.908 3.084-1.369 4.489-1.369 1.143 0 2.158.307 3.019.91a.24.24 0 0 1 .055.055c.894 1.244 1.367 2.971 1.367 4.997 0 6.241-4.425 13.875-9.865 17.016-1.573.908-3.084 1.369-4.489 1.369zm-2.718-1.172c.773.533 1.687.901 2.718.901 1.322 0 2.754-.538 4.256-1.405 5.31-3.066 9.631-10.567 9.631-16.661 0-1.908-.434-3.554-1.256-4.716-.774-.532-1.688-.814-2.718-.814-1.322 0-2.754.433-4.256 1.3-5.31 3.066-9.631 10.564-9.631 16.657 0 1.91.434 3.576 1.256 4.738z' fill='#607D8B'/><path d='M150.72 172.361l-.363-.295a24.105 24.105 0 0 0 2.148-3.128 24.05 24.05 0 0 0 1.977-4.375l.443.149a24.54 24.54 0 0 1-2.015 4.46 24.61 24.61 0 0 1-2.19 3.189M115.917 191.514l-.363-.294a24.174 24.174 0 0 0 2.148-3.128 24.038 24.038 0 0 0 1.976-4.375l.443.148a24.48 24.48 0 0 1-2.015 4.461 24.662 24.662 0 0 1-2.189 3.188M114 237.476V182.584 237.476' fill='#607D8B'/><g><path d='M81.822 37.474c.017-.135-.075-.28-.267-.392-.327-.188-.826-.21-1.109-.045l-6.012 3.471c-.131.076-.194.178-.191.285.002.132.002.461.002.578v.043l-.007.128-6.591 3.779c-.001 0-2.077 1.046-2.787 5.192 0 0-.912 6.961-.898 19.745.015 12.57.606 17.07 1.167 21.351.22 1.684 3.001 2.125 3.001 2.125.331.04.698-.027 1.08-.248l75.273-43.551c1.808-1.069 2.667-3.719 3.056-6.284 1.213-7.99 1.675-32.978-.275-39.878-.196-.693-.51-1.083-.868-1.282l-2.086-.79c-.727.028-1.416.467-1.534.535L82.032 37.072l-.21.402' fill='#FFF'/><path d='M144.311 1.701l2.085.79c.358.199.672.589.868 1.282 1.949 6.9 1.487 31.887.275 39.878-.39 2.565-1.249 5.215-3.056 6.284L69.21 93.486a1.78 1.78 0 0 1-.896.258l-.183-.011c0 .001-2.782-.44-3.003-2.124-.56-4.282-1.151-8.781-1.165-21.351-.015-12.784.897-19.745.897-19.745.71-4.146 2.787-5.192 2.787-5.192l6.591-3.779.007-.128v-.043c0-.117 0-.446-.002-.578-.003-.107.059-.21.191-.285l6.012-3.472a.98.98 0 0 1 .481-.11c.218 0 .449.053.627.156.193.112.285.258.268.392l.211-.402 60.744-34.836c.117-.068.806-.507 1.534-.535m0-.997l-.039.001c-.618.023-1.283.244-1.974.656l-.021.012-60.519 34.706a2.358 2.358 0 0 0-.831-.15c-.365 0-.704.084-.98.244l-6.012 3.471c-.442.255-.699.69-.689 1.166l.001.15-6.08 3.487c-.373.199-2.542 1.531-3.29 5.898l-.006.039c-.009.07-.92 7.173-.906 19.875.014 12.62.603 17.116 1.172 21.465l.002.015c.308 2.355 3.475 2.923 3.836 2.98l.034.004c.101.013.204.019.305.019a2.77 2.77 0 0 0 1.396-.392l75.273-43.552c1.811-1.071 2.999-3.423 3.542-6.997 1.186-7.814 1.734-33.096-.301-40.299-.253-.893-.704-1.527-1.343-1.882l-.132-.062-2.085-.789a.973.973 0 0 0-.353-.065' fill='#455A64'/><path d='M128.267 11.565l1.495.434-56.339 32.326' fill='#FFF'/><path d='M74.202 90.545a.5.5 0 0 1-.25-.931l18.437-10.645a.499.499 0 1 1 .499.864L74.451 90.478l-.249.067M75.764 42.654l-.108-.062.046-.171 5.135-2.964.17.045-.045.171-5.135 2.964-.063.017M70.52 90.375V46.421l.063-.036L137.84 7.554v43.954l-.062.036L70.52 90.375zm.25-43.811v43.38l66.821-38.579V7.985L70.77 46.564z' fill='#607D8B'/><path d='M86.986 83.182c-.23.149-.612.384-.849.523l-11.505 6.701c-.237.139-.206.252.068.252h.565c.275 0 .693-.113.93-.252L87.7 83.705c.237-.139.428-.253.425-.256a11.29 11.29 0 0 1-.006-.503c0-.274-.188-.377-.418-.227l-.715.463' fill='#607D8B'/><path d='M75.266 90.782H74.7c-.2 0-.316-.056-.346-.166-.03-.11.043-.217.215-.317l11.505-6.702c.236-.138.615-.371.844-.519l.715-.464a.488.488 0 0 1 .266-.089c.172 0 .345.13.345.421 0 .214.001.363.003.437l.006.004-.004.069c-.003.075-.003.075-.486.356l-11.505 6.702a2.282 2.282 0 0 1-.992.268zm-.6-.25l.034.001h.566c.252 0 .649-.108.866-.234l11.505-6.702c.168-.098.294-.173.361-.214-.004-.084-.004-.218-.004-.437l-.095-.171-.131.049-.714.463c-.232.15-.616.386-.854.525l-11.505 6.702-.029.018z' fill='#607D8B'/><path d='M75.266 89.871H74.7c-.2 0-.316-.056-.346-.166-.03-.11.043-.217.215-.317l11.505-6.702c.258-.151.694-.268.993-.268h.565c.2 0 .316.056.346.166.03.11-.043.217-.215.317l-11.505 6.702a2.282 2.282 0 0 1-.992.268zm-.6-.25l.034.001h.566c.252 0 .649-.107.866-.234l11.505-6.702.03-.018-.035-.001h-.565c-.252 0-.649.108-.867.234l-11.505 6.702-.029.018zM74.37 90.801v-1.247 1.247' fill='#607D8B'/><path d='M68.13 93.901c-.751-.093-1.314-.737-1.439-1.376-.831-4.238-1.151-8.782-1.165-21.352-.015-12.784.897-19.745.897-19.745.711-4.146 2.787-5.192 2.787-5.192l74.859-43.219c.223-.129 2.487-1.584 3.195.923 1.95 6.9 1.488 31.887.275 39.878-.389 2.565-1.248 5.215-3.056 6.283L69.21 93.653c-.382.221-.749.288-1.08.248 0 0-2.781-.441-3.001-2.125-.561-4.281-1.152-8.781-1.167-21.351-.014-12.784.898-19.745.898-19.745.71-4.146 2.787-5.191 2.787-5.191l6.598-3.81.871-.119 6.599-3.83.046-.461L68.13 93.901' fill='#FAFAFA'/><path d='M68.317 94.161l-.215-.013h-.001l-.244-.047c-.719-.156-2.772-.736-2.976-2.292-.568-4.34-1.154-8.813-1.168-21.384-.014-12.654.891-19.707.9-19.777.725-4.231 2.832-5.338 2.922-5.382l6.628-3.827.87-.119 6.446-3.742.034-.334a.248.248 0 0 1 .273-.223.248.248 0 0 1 .223.272l-.059.589-6.752 3.919-.87.118-6.556 3.785c-.031.016-1.99 1.068-2.666 5.018-.007.06-.908 7.086-.894 19.702.014 12.539.597 16.996 1.161 21.305.091.691.689 1.154 1.309 1.452a1.95 1.95 0 0 1-.236-.609c-.781-3.984-1.155-8.202-1.17-21.399-.014-12.653.891-19.707.9-19.777.725-4.231 2.832-5.337 2.922-5.382-.004.001 74.444-42.98 74.846-43.212l.028-.017c.904-.538 1.72-.688 2.36-.433.555.221.949.733 1.172 1.52 2.014 7.128 1.46 32.219.281 39.983-.507 3.341-1.575 5.515-3.175 6.462L69.335 93.869a2.023 2.023 0 0 1-1.018.292zm-.147-.507c.293.036.604-.037.915-.217l75.273-43.551c1.823-1.078 2.602-3.915 2.934-6.106 1.174-7.731 1.731-32.695-.268-39.772-.178-.631-.473-1.032-.876-1.192-.484-.193-1.166-.052-1.921.397l-.034.021-74.858 43.218c-.031.017-1.989 1.069-2.666 5.019-.007.059-.908 7.085-.894 19.702.015 13.155.386 17.351 1.161 21.303.09.461.476.983 1.037 1.139.114.025.185.037.196.039h.001z' fill='#455A64'/><path d='M69.317 68.982c.489-.281.885-.056.885.505 0 .56-.396 1.243-.885 1.525-.488.282-.884.057-.884-.504 0-.56.396-1.243.884-1.526' fill='#FFF'/><path d='M68.92 71.133c-.289 0-.487-.228-.487-.625 0-.56.396-1.243.884-1.526a.812.812 0 0 1 .397-.121c.289 0 .488.229.488.626 0 .56-.396 1.243-.885 1.525a.812.812 0 0 1-.397.121m.794-2.459a.976.976 0 0 0-.49.147c-.548.317-.978 1.058-.978 1.687 0 .486.271.812.674.812a.985.985 0 0 0 .491-.146c.548-.317.978-1.057.978-1.687 0-.486-.272-.813-.675-.813' fill='#8097A2'/><path d='M68.92 70.947c-.271 0-.299-.307-.299-.439 0-.491.361-1.116.79-1.363a.632.632 0 0 1 .303-.096c.272 0 .301.306.301.438 0 .491-.363 1.116-.791 1.364a.629.629 0 0 1-.304.096m.794-2.086a.812.812 0 0 0-.397.121c-.488.283-.884.966-.884 1.526 0 .397.198.625.487.625a.812.812 0 0 0 .397-.121c.489-.282.885-.965.885-1.525 0-.397-.199-.626-.488-.626' fill='#8097A2'/><path d='M69.444 85.35c.264-.152.477-.031.477.272 0 .303-.213.67-.477.822-.263.153-.477.031-.477-.271 0-.302.214-.671.477-.823' fill='#FFF'/><path d='M69.23 86.51c-.156 0-.263-.123-.263-.337 0-.302.214-.671.477-.823a.431.431 0 0 1 .214-.066c.156 0 .263.124.263.338 0 .303-.213.67-.477.822a.431.431 0 0 1-.214.066m.428-1.412c-.1 0-.203.029-.307.09-.32.185-.57.618-.57.985 0 .309.185.524.449.524a.63.63 0 0 0 .308-.09c.32-.185.57-.618.57-.985 0-.309-.185-.524-.45-.524' fill='#8097A2'/><path d='M69.23 86.322l-.076-.149c0-.235.179-.544.384-.661l.12-.041.076.151c0 .234-.179.542-.383.66l-.121.04m.428-1.038a.431.431 0 0 0-.214.066c-.263.152-.477.521-.477.823 0 .214.107.337.263.337a.431.431 0 0 0 .214-.066c.264-.152.477-.519.477-.822 0-.214-.107-.338-.263-.338' fill='#8097A2'/><path d='M139.278 7.769v43.667L72.208 90.16V46.493l67.07-38.724' fill='#455A64'/><path d='M72.083 90.375V46.421l.063-.036 67.257-38.831v43.954l-.062.036-67.258 38.831zm.25-43.811v43.38l66.821-38.579V7.985L72.333 46.564z' fill='#607D8B'/></g><path d='M125.737 88.647l-7.639 3.334V84l-11.459 4.713v8.269L99 100.315l13.369 3.646 13.368-15.314' fill='#455A64'/></g></svg>";
                function Re() {
                  this.loadIcon_();
                  var e = document.createElement("div");
                  ((s = e.style).position = "fixed"),
                    (s.top = 0),
                    (s.right = 0),
                    (s.bottom = 0),
                    (s.left = 0),
                    (s.backgroundColor = "gray"),
                    (s.fontFamily = "sans-serif"),
                    (s.zIndex = 1e6);
                  var t = document.createElement("img");
                  (t.src = this.icon),
                    ((s = t.style).marginLeft = "25%"),
                    (s.marginTop = "25%"),
                    (s.width = "50%"),
                    e.appendChild(t);
                  var i = document.createElement("div");
                  ((s = i.style).textAlign = "center"),
                    (s.fontSize = "16px"),
                    (s.lineHeight = "24px"),
                    (s.margin = "24px 25%"),
                    (s.width = "50%"),
                    (i.innerHTML =
                      "Place your phone into your Cardboard viewer."),
                    e.appendChild(i);
                  var r = document.createElement("div");
                  ((s = r.style).backgroundColor = "#CFD8DC"),
                    (s.position = "fixed"),
                    (s.bottom = 0),
                    (s.width = "100%"),
                    (s.height = "48px"),
                    (s.padding = "14px 24px"),
                    (s.boxSizing = "border-box"),
                    (s.color = "#656A6B"),
                    e.appendChild(r);
                  var n = document.createElement("div");
                  (n.style.float = "left"),
                    (n.innerHTML = "No Cardboard viewer?");
                  var s,
                    a = document.createElement("a");
                  (a.href =
                    "https://www.google.com/get/cardboard/get-cardboard/"),
                    (a.innerHTML = "get one"),
                    (a.target = "_blank"),
                    ((s = a.style).float = "right"),
                    (s.fontWeight = 600),
                    (s.textTransform = "uppercase"),
                    (s.borderLeft = "1px solid gray"),
                    (s.paddingLeft = "24px"),
                    (s.textDecoration = "none"),
                    (s.color = "#656A6B"),
                    r.appendChild(n),
                    r.appendChild(a),
                    (this.overlay = e),
                    (this.text = i),
                    this.hide();
                }
                (Re.prototype.show = function (e) {
                  e || this.overlay.parentElement
                    ? e &&
                      (this.overlay.parentElement &&
                        this.overlay.parentElement != e &&
                        this.overlay.parentElement.removeChild(this.overlay),
                      e.appendChild(this.overlay))
                    : document.body.appendChild(this.overlay),
                    (this.overlay.style.display = "block");
                  var t = this.overlay.querySelector("img").style;
                  w()
                    ? ((t.width = "20%"),
                      (t.marginLeft = "40%"),
                      (t.marginTop = "3%"))
                    : ((t.width = "50%"),
                      (t.marginLeft = "25%"),
                      (t.marginTop = "25%"));
                }),
                  (Re.prototype.hide = function () {
                    this.overlay.style.display = "none";
                  }),
                  (Re.prototype.showTemporarily = function (e, t) {
                    this.show(t),
                      (this.timer = setTimeout(this.hide.bind(this), e));
                  }),
                  (Re.prototype.disableShowTemporarily = function () {
                    clearTimeout(this.timer);
                  }),
                  (Re.prototype.update = function () {
                    this.disableShowTemporarily(),
                      !w() && R() ? this.show() : this.hide();
                  }),
                  (Re.prototype.loadIcon_ = function () {
                    this.icon = l("image/svg+xml", Be);
                  });
                var Se = "CardboardV1",
                  Ce = "WEBVR_CARDBOARD_VIEWER",
                  Ie = "webvr-polyfill-viewer-selector";
                function xe(e) {
                  try {
                    this.selectedKey = localStorage.getItem(Ce);
                  } catch (e) {
                    console.error("Failed to load viewer profile: %s", e);
                  }
                  this.selectedKey || (this.selectedKey = e || Se),
                    (this.dialog = this.createDialog_(pe.Viewers)),
                    (this.root = null),
                    (this.onChangeCallbacks_ = []);
                }
                function Le(e) {
                  return e &&
                    e.__esModule &&
                    Object.prototype.hasOwnProperty.call(e, "default")
                    ? e.default
                    : e;
                }
                function Pe(e, t) {
                  return e((t = { exports: {} }), t.exports), t.exports;
                }
                (xe.prototype.show = function (e) {
                  (this.root = e),
                    e.appendChild(this.dialog),
                    (this.dialog.querySelector("#" + this.selectedKey).checked =
                      !0),
                    (this.dialog.style.display = "block");
                }),
                  (xe.prototype.hide = function () {
                    this.root &&
                      this.root.contains(this.dialog) &&
                      this.root.removeChild(this.dialog),
                      (this.dialog.style.display = "none");
                  }),
                  (xe.prototype.getCurrentViewer = function () {
                    return pe.Viewers[this.selectedKey];
                  }),
                  (xe.prototype.getSelectedKey_ = function () {
                    var e = this.dialog.querySelector(
                      "input[name=field]:checked"
                    );
                    return e ? e.id : null;
                  }),
                  (xe.prototype.onChange = function (e) {
                    this.onChangeCallbacks_.push(e);
                  }),
                  (xe.prototype.fireOnChange_ = function (e) {
                    for (var t = 0; t < this.onChangeCallbacks_.length; t++)
                      this.onChangeCallbacks_[t](e);
                  }),
                  (xe.prototype.onSave_ = function () {
                    if (
                      ((this.selectedKey = this.getSelectedKey_()),
                      this.selectedKey && pe.Viewers[this.selectedKey])
                    ) {
                      this.fireOnChange_(pe.Viewers[this.selectedKey]);
                      try {
                        localStorage.setItem(Ce, this.selectedKey);
                      } catch (e) {
                        console.error("Failed to save viewer profile: %s", e);
                      }
                      this.hide();
                    } else
                      console.error(
                        "ViewerSelector.onSave_: this should never happen!"
                      );
                  }),
                  (xe.prototype.createDialog_ = function (e) {
                    var t = document.createElement("div");
                    t.classList.add(Ie), (t.style.display = "none");
                    var i = document.createElement("div");
                    ((s = i.style).position = "fixed"),
                      (s.left = 0),
                      (s.top = 0),
                      (s.width = "100%"),
                      (s.height = "100%"),
                      (s.background = "rgba(0, 0, 0, 0.3)"),
                      i.addEventListener("click", this.hide.bind(this));
                    var r = 280,
                      n = document.createElement("div"),
                      s = n.style;
                    for (var a in ((s.boxSizing = "border-box"),
                    (s.position = "fixed"),
                    (s.top = "24px"),
                    (s.left = "50%"),
                    (s.marginLeft = -r / 2 + "px"),
                    (s.width = r + "px"),
                    (s.padding = "24px"),
                    (s.overflow = "hidden"),
                    (s.background = "#fafafa"),
                    (s.fontFamily = "'Roboto', sans-serif"),
                    (s.boxShadow = "0px 5px 20px #666"),
                    n.appendChild(this.createH1_("Select your viewer")),
                    e))
                      n.appendChild(this.createChoice_(a, e[a].label));
                    return (
                      n.appendChild(
                        this.createButton_("Save", this.onSave_.bind(this))
                      ),
                      t.appendChild(i),
                      t.appendChild(n),
                      t
                    );
                  }),
                  (xe.prototype.createH1_ = function (e) {
                    var t = document.createElement("h1"),
                      i = t.style;
                    return (
                      (i.color = "black"),
                      (i.fontSize = "20px"),
                      (i.fontWeight = "bold"),
                      (i.marginTop = 0),
                      (i.marginBottom = "24px"),
                      (t.innerHTML = e),
                      t
                    );
                  }),
                  (xe.prototype.createChoice_ = function (e, t) {
                    var i = document.createElement("div");
                    (i.style.marginTop = "8px"), (i.style.color = "black");
                    var r = document.createElement("input");
                    (r.style.fontSize = "30px"),
                      r.setAttribute("id", e),
                      r.setAttribute("type", "radio"),
                      r.setAttribute("value", e),
                      r.setAttribute("name", "field");
                    var n = document.createElement("label");
                    return (
                      (n.style.marginLeft = "4px"),
                      n.setAttribute("for", e),
                      (n.innerHTML = t),
                      i.appendChild(r),
                      i.appendChild(n),
                      i
                    );
                  }),
                  (xe.prototype.createButton_ = function (e, t) {
                    var i = document.createElement("button");
                    i.innerHTML = e;
                    var r = i.style;
                    return (
                      (r.float = "right"),
                      (r.textTransform = "uppercase"),
                      (r.color = "#1094f7"),
                      (r.fontSize = "14px"),
                      (r.letterSpacing = 0),
                      (r.border = 0),
                      (r.background = "none"),
                      (r.marginTop = "16px"),
                      i.addEventListener("click", t),
                      i
                    );
                  }),
                  "undefined" != typeof window
                    ? window
                    : void 0 !== e || ("undefined" != typeof self && self);
                var Ne = Le(
                    Pe(function (e, t) {
                      !(function (t, i) {
                        e.exports = i();
                      })(0, function () {
                        return (function (e) {
                          var t = {};
                          function i(r) {
                            if (t[r]) return t[r].exports;
                            var n = (t[r] = { i: r, l: !1, exports: {} });
                            return (
                              e[r].call(n.exports, n, n.exports, i),
                              (n.l = !0),
                              n.exports
                            );
                          }
                          return (
                            (i.m = e),
                            (i.c = t),
                            (i.d = function (e, t, r) {
                              i.o(e, t) ||
                                Object.defineProperty(e, t, {
                                  configurable: !1,
                                  enumerable: !0,
                                  get: r,
                                });
                            }),
                            (i.n = function (e) {
                              var t =
                                e && e.__esModule
                                  ? function () {
                                      return e.default;
                                    }
                                  : function () {
                                      return e;
                                    };
                              return i.d(t, "a", t), t;
                            }),
                            (i.o = function (e, t) {
                              return Object.prototype.hasOwnProperty.call(e, t);
                            }),
                            (i.p = ""),
                            i((i.s = 0))
                          );
                        })([
                          function (e, t, i) {
                            var r = (function () {
                              function e(e, t) {
                                for (var i = 0; i < t.length; i++) {
                                  var r = t[i];
                                  (r.enumerable = r.enumerable || !1),
                                    (r.configurable = !0),
                                    "value" in r && (r.writable = !0),
                                    Object.defineProperty(e, r.key, r);
                                }
                              }
                              return function (t, i, r) {
                                return i && e(t.prototype, i), r && e(t, r), t;
                              };
                            })();
                            function n(e, t) {
                              if (!(e instanceof t))
                                throw new TypeError(
                                  "Cannot call a class as a function"
                                );
                            }
                            var s = i(1),
                              a =
                                "undefined" != typeof navigator &&
                                parseFloat(
                                  (
                                    "" +
                                    (/CPU.*OS ([0-9_]{3,4})[0-9_]{0,1}|(CPU like).*AppleWebKit.*Mobile/i.exec(
                                      navigator.userAgent
                                    ) || [0, ""])[1]
                                  )
                                    .replace("undefined", "3_2")
                                    .replace("_", ".")
                                    .replace("_", "")
                                ) < 10 &&
                                !window.MSStream,
                              A = (function () {
                                function e() {
                                  n(this, e),
                                    a
                                      ? (this.noSleepTimer = null)
                                      : ((this.noSleepVideo =
                                          document.createElement("video")),
                                        this.noSleepVideo.setAttribute(
                                          "playsinline",
                                          ""
                                        ),
                                        this.noSleepVideo.setAttribute(
                                          "src",
                                          s
                                        ),
                                        this.noSleepVideo.addEventListener(
                                          "timeupdate",
                                          function (e) {
                                            this.noSleepVideo.currentTime >
                                              0.5 &&
                                              (this.noSleepVideo.currentTime =
                                                Math.random());
                                          }.bind(this)
                                        ));
                                }
                                return (
                                  r(e, [
                                    {
                                      key: "enable",
                                      value: function () {
                                        a
                                          ? (this.disable(),
                                            (this.noSleepTimer =
                                              window.setInterval(function () {
                                                (window.location.href = "/"),
                                                  window.setTimeout(
                                                    window.stop,
                                                    0
                                                  );
                                              }, 15e3)))
                                          : this.noSleepVideo.play();
                                      },
                                    },
                                    {
                                      key: "disable",
                                      value: function () {
                                        a
                                          ? this.noSleepTimer &&
                                            (window.clearInterval(
                                              this.noSleepTimer
                                            ),
                                            (this.noSleepTimer = null))
                                          : this.noSleepVideo.pause();
                                      },
                                    },
                                  ]),
                                  e
                                );
                              })();
                            e.exports = A;
                          },
                          function (e, t, i) {
                            e.exports =
                              "data:video/mp4;base64,AAAAIGZ0eXBtcDQyAAACAGlzb21pc28yYXZjMW1wNDEAAAAIZnJlZQAACKBtZGF0AAAC8wYF///v3EXpvebZSLeWLNgg2SPu73gyNjQgLSBjb3JlIDE0MiByMjQ3OSBkZDc5YTYxIC0gSC4yNjQvTVBFRy00IEFWQyBjb2RlYyAtIENvcHlsZWZ0IDIwMDMtMjAxNCAtIGh0dHA6Ly93d3cudmlkZW9sYW4ub3JnL3gyNjQuaHRtbCAtIG9wdGlvbnM6IGNhYmFjPTEgcmVmPTEgZGVibG9jaz0xOjA6MCBhbmFseXNlPTB4MToweDExMSBtZT1oZXggc3VibWU9MiBwc3k9MSBwc3lfcmQ9MS4wMDowLjAwIG1peGVkX3JlZj0wIG1lX3JhbmdlPTE2IGNocm9tYV9tZT0xIHRyZWxsaXM9MCA4eDhkY3Q9MCBjcW09MCBkZWFkem9uZT0yMSwxMSBmYXN0X3Bza2lwPTEgY2hyb21hX3FwX29mZnNldD0wIHRocmVhZHM9NiBsb29rYWhlYWRfdGhyZWFkcz0xIHNsaWNlZF90aHJlYWRzPTAgbnI9MCBkZWNpbWF0ZT0xIGludGVybGFjZWQ9MCBibHVyYXlfY29tcGF0PTAgY29uc3RyYWluZWRfaW50cmE9MCBiZnJhbWVzPTMgYl9weXJhbWlkPTIgYl9hZGFwdD0xIGJfYmlhcz0wIGRpcmVjdD0xIHdlaWdodGI9MSBvcGVuX2dvcD0wIHdlaWdodHA9MSBrZXlpbnQ9MzAwIGtleWludF9taW49MzAgc2NlbmVjdXQ9NDAgaW50cmFfcmVmcmVzaD0wIHJjX2xvb2thaGVhZD0xMCByYz1jcmYgbWJ0cmVlPTEgY3JmPTIwLjAgcWNvbXA9MC42MCBxcG1pbj0wIHFwbWF4PTY5IHFwc3RlcD00IHZidl9tYXhyYXRlPTIwMDAwIHZidl9idWZzaXplPTI1MDAwIGNyZl9tYXg9MC4wIG5hbF9ocmQ9bm9uZSBmaWxsZXI9MCBpcF9yYXRpbz0xLjQwIGFxPTE6MS4wMACAAAAAOWWIhAA3//p+C7v8tDDSTjf97w55i3SbRPO4ZY+hkjD5hbkAkL3zpJ6h/LR1CAABzgB1kqqzUorlhQAAAAxBmiQYhn/+qZYADLgAAAAJQZ5CQhX/AAj5IQADQGgcIQADQGgcAAAACQGeYUQn/wALKCEAA0BoHAAAAAkBnmNEJ/8ACykhAANAaBwhAANAaBwAAAANQZpoNExDP/6plgAMuSEAA0BoHAAAAAtBnoZFESwr/wAI+SEAA0BoHCEAA0BoHAAAAAkBnqVEJ/8ACykhAANAaBwAAAAJAZ6nRCf/AAsoIQADQGgcIQADQGgcAAAADUGarDRMQz/+qZYADLghAANAaBwAAAALQZ7KRRUsK/8ACPkhAANAaBwAAAAJAZ7pRCf/AAsoIQADQGgcIQADQGgcAAAACQGe60Qn/wALKCEAA0BoHAAAAA1BmvA0TEM//qmWAAy5IQADQGgcIQADQGgcAAAAC0GfDkUVLCv/AAj5IQADQGgcAAAACQGfLUQn/wALKSEAA0BoHCEAA0BoHAAAAAkBny9EJ/8ACyghAANAaBwAAAANQZs0NExDP/6plgAMuCEAA0BoHAAAAAtBn1JFFSwr/wAI+SEAA0BoHCEAA0BoHAAAAAkBn3FEJ/8ACyghAANAaBwAAAAJAZ9zRCf/AAsoIQADQGgcIQADQGgcAAAADUGbeDRMQz/+qZYADLkhAANAaBwAAAALQZ+WRRUsK/8ACPghAANAaBwhAANAaBwAAAAJAZ+1RCf/AAspIQADQGgcAAAACQGft0Qn/wALKSEAA0BoHCEAA0BoHAAAAA1Bm7w0TEM//qmWAAy4IQADQGgcAAAAC0Gf2kUVLCv/AAj5IQADQGgcAAAACQGf+UQn/wALKCEAA0BoHCEAA0BoHAAAAAkBn/tEJ/8ACykhAANAaBwAAAANQZvgNExDP/6plgAMuSEAA0BoHCEAA0BoHAAAAAtBnh5FFSwr/wAI+CEAA0BoHAAAAAkBnj1EJ/8ACyghAANAaBwhAANAaBwAAAAJAZ4/RCf/AAspIQADQGgcAAAADUGaJDRMQz/+qZYADLghAANAaBwAAAALQZ5CRRUsK/8ACPkhAANAaBwhAANAaBwAAAAJAZ5hRCf/AAsoIQADQGgcAAAACQGeY0Qn/wALKSEAA0BoHCEAA0BoHAAAAA1Bmmg0TEM//qmWAAy5IQADQGgcAAAAC0GehkUVLCv/AAj5IQADQGgcIQADQGgcAAAACQGepUQn/wALKSEAA0BoHAAAAAkBnqdEJ/8ACyghAANAaBwAAAANQZqsNExDP/6plgAMuCEAA0BoHCEAA0BoHAAAAAtBnspFFSwr/wAI+SEAA0BoHAAAAAkBnulEJ/8ACyghAANAaBwhAANAaBwAAAAJAZ7rRCf/AAsoIQADQGgcAAAADUGa8DRMQz/+qZYADLkhAANAaBwhAANAaBwAAAALQZ8ORRUsK/8ACPkhAANAaBwAAAAJAZ8tRCf/AAspIQADQGgcIQADQGgcAAAACQGfL0Qn/wALKCEAA0BoHAAAAA1BmzQ0TEM//qmWAAy4IQADQGgcAAAAC0GfUkUVLCv/AAj5IQADQGgcIQADQGgcAAAACQGfcUQn/wALKCEAA0BoHAAAAAkBn3NEJ/8ACyghAANAaBwhAANAaBwAAAANQZt4NExC//6plgAMuSEAA0BoHAAAAAtBn5ZFFSwr/wAI+CEAA0BoHCEAA0BoHAAAAAkBn7VEJ/8ACykhAANAaBwAAAAJAZ+3RCf/AAspIQADQGgcAAAADUGbuzRMQn/+nhAAYsAhAANAaBwhAANAaBwAAAAJQZ/aQhP/AAspIQADQGgcAAAACQGf+UQn/wALKCEAA0BoHCEAA0BoHCEAA0BoHCEAA0BoHCEAA0BoHCEAA0BoHAAACiFtb292AAAAbG12aGQAAAAA1YCCX9WAgl8AAAPoAAAH/AABAAABAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAGGlvZHMAAAAAEICAgAcAT////v7/AAAF+XRyYWsAAABcdGtoZAAAAAPVgIJf1YCCXwAAAAEAAAAAAAAH0AAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAygAAAMoAAAAAACRlZHRzAAAAHGVsc3QAAAAAAAAAAQAAB9AAABdwAAEAAAAABXFtZGlhAAAAIG1kaGQAAAAA1YCCX9WAgl8AAV+QAAK/IFXEAAAAAAAtaGRscgAAAAAAAAAAdmlkZQAAAAAAAAAAAAAAAFZpZGVvSGFuZGxlcgAAAAUcbWluZgAAABR2bWhkAAAAAQAAAAAAAAAAAAAAJGRpbmYAAAAcZHJlZgAAAAAAAAABAAAADHVybCAAAAABAAAE3HN0YmwAAACYc3RzZAAAAAAAAAABAAAAiGF2YzEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAygDKAEgAAABIAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY//8AAAAyYXZjQwFNQCj/4QAbZ01AKOyho3ySTUBAQFAAAAMAEAAr8gDxgxlgAQAEaO+G8gAAABhzdHRzAAAAAAAAAAEAAAA8AAALuAAAABRzdHNzAAAAAAAAAAEAAAABAAAB8GN0dHMAAAAAAAAAPAAAAAEAABdwAAAAAQAAOpgAAAABAAAXcAAAAAEAAAAAAAAAAQAAC7gAAAABAAA6mAAAAAEAABdwAAAAAQAAAAAAAAABAAALuAAAAAEAADqYAAAAAQAAF3AAAAABAAAAAAAAAAEAAAu4AAAAAQAAOpgAAAABAAAXcAAAAAEAAAAAAAAAAQAAC7gAAAABAAA6mAAAAAEAABdwAAAAAQAAAAAAAAABAAALuAAAAAEAADqYAAAAAQAAF3AAAAABAAAAAAAAAAEAAAu4AAAAAQAAOpgAAAABAAAXcAAAAAEAAAAAAAAAAQAAC7gAAAABAAA6mAAAAAEAABdwAAAAAQAAAAAAAAABAAALuAAAAAEAADqYAAAAAQAAF3AAAAABAAAAAAAAAAEAAAu4AAAAAQAAOpgAAAABAAAXcAAAAAEAAAAAAAAAAQAAC7gAAAABAAA6mAAAAAEAABdwAAAAAQAAAAAAAAABAAALuAAAAAEAADqYAAAAAQAAF3AAAAABAAAAAAAAAAEAAAu4AAAAAQAAOpgAAAABAAAXcAAAAAEAAAAAAAAAAQAAC7gAAAABAAA6mAAAAAEAABdwAAAAAQAAAAAAAAABAAALuAAAAAEAAC7gAAAAAQAAF3AAAAABAAAAAAAAABxzdHNjAAAAAAAAAAEAAAABAAAAAQAAAAEAAAEEc3RzegAAAAAAAAAAAAAAPAAAAzQAAAAQAAAADQAAAA0AAAANAAAAEQAAAA8AAAANAAAADQAAABEAAAAPAAAADQAAAA0AAAARAAAADwAAAA0AAAANAAAAEQAAAA8AAAANAAAADQAAABEAAAAPAAAADQAAAA0AAAARAAAADwAAAA0AAAANAAAAEQAAAA8AAAANAAAADQAAABEAAAAPAAAADQAAAA0AAAARAAAADwAAAA0AAAANAAAAEQAAAA8AAAANAAAADQAAABEAAAAPAAAADQAAAA0AAAARAAAADwAAAA0AAAANAAAAEQAAAA8AAAANAAAADQAAABEAAAANAAAADQAAAQBzdGNvAAAAAAAAADwAAAAwAAADZAAAA3QAAAONAAADoAAAA7kAAAPQAAAD6wAAA/4AAAQXAAAELgAABEMAAARcAAAEbwAABIwAAAShAAAEugAABM0AAATkAAAE/wAABRIAAAUrAAAFQgAABV0AAAVwAAAFiQAABaAAAAW1AAAFzgAABeEAAAX+AAAGEwAABiwAAAY/AAAGVgAABnEAAAaEAAAGnQAABrQAAAbPAAAG4gAABvUAAAcSAAAHJwAAB0AAAAdTAAAHcAAAB4UAAAeeAAAHsQAAB8gAAAfjAAAH9gAACA8AAAgmAAAIQQAACFQAAAhnAAAIhAAACJcAAAMsdHJhawAAAFx0a2hkAAAAA9WAgl/VgIJfAAAAAgAAAAAAAAf8AAAAAAAAAAAAAAABAQAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAACsm1kaWEAAAAgbWRoZAAAAADVgIJf1YCCXwAArEQAAWAAVcQAAAAAACdoZGxyAAAAAAAAAABzb3VuAAAAAAAAAAAAAAAAU3RlcmVvAAAAAmNtaW5mAAAAEHNtaGQAAAAAAAAAAAAAACRkaW5mAAAAHGRyZWYAAAAAAAAAAQAAAAx1cmwgAAAAAQAAAidzdGJsAAAAZ3N0c2QAAAAAAAAAAQAAAFdtcDRhAAAAAAAAAAEAAAAAAAAAAAACABAAAAAArEQAAAAAADNlc2RzAAAAAAOAgIAiAAIABICAgBRAFQAAAAADDUAAAAAABYCAgAISEAaAgIABAgAAABhzdHRzAAAAAAAAAAEAAABYAAAEAAAAABxzdHNjAAAAAAAAAAEAAAABAAAAAQAAAAEAAAAUc3RzegAAAAAAAAAGAAAAWAAAAXBzdGNvAAAAAAAAAFgAAAOBAAADhwAAA5oAAAOtAAADswAAA8oAAAPfAAAD5QAAA/gAAAQLAAAEEQAABCgAAAQ9AAAEUAAABFYAAARpAAAEgAAABIYAAASbAAAErgAABLQAAATHAAAE3gAABPMAAAT5AAAFDAAABR8AAAUlAAAFPAAABVEAAAVXAAAFagAABX0AAAWDAAAFmgAABa8AAAXCAAAFyAAABdsAAAXyAAAF+AAABg0AAAYgAAAGJgAABjkAAAZQAAAGZQAABmsAAAZ+AAAGkQAABpcAAAauAAAGwwAABskAAAbcAAAG7wAABwYAAAcMAAAHIQAABzQAAAc6AAAHTQAAB2QAAAdqAAAHfwAAB5IAAAeYAAAHqwAAB8IAAAfXAAAH3QAAB/AAAAgDAAAICQAACCAAAAg1AAAIOwAACE4AAAhhAAAIeAAACH4AAAiRAAAIpAAACKoAAAiwAAAItgAACLwAAAjCAAAAFnVkdGEAAAAObmFtZVN0ZXJlbwAAAHB1ZHRhAAAAaG1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAAO2lsc3QAAAAzqXRvbwAAACtkYXRhAAAAAQAAAABIYW5kQnJha2UgMC4xMC4yIDIwMTUwNjExMDA=";
                          },
                        ]);
                      });
                    })
                  ),
                  Ge = 1e3,
                  Oe = [0, 0, 0.5, 1],
                  Qe = [0.5, 0, 0.5, 1],
                  Ue = window.requestAnimationFrame,
                  ke = window.cancelAnimationFrame;
                function Ve() {
                  (this.leftProjectionMatrix = new Float32Array(16)),
                    (this.leftViewMatrix = new Float32Array(16)),
                    (this.rightProjectionMatrix = new Float32Array(16)),
                    (this.rightViewMatrix = new Float32Array(16)),
                    (this.pose = null);
                }
                function ze(e) {
                  Object.defineProperties(this, {
                    hasPosition: {
                      writable: !1,
                      enumerable: !0,
                      value: e.hasPosition,
                    },
                    hasExternalDisplay: {
                      writable: !1,
                      enumerable: !0,
                      value: e.hasExternalDisplay,
                    },
                    canPresent: {
                      writable: !1,
                      enumerable: !0,
                      value: e.canPresent,
                    },
                    maxLayers: {
                      writable: !1,
                      enumerable: !0,
                      value: e.maxLayers,
                    },
                    hasOrientation: {
                      enumerable: !0,
                      get: function () {
                        return (
                          G(
                            "VRDisplayCapabilities.prototype.hasOrientation",
                            "VRDisplay.prototype.getFrameData"
                          ),
                          e.hasOrientation
                        );
                      },
                    },
                  });
                }
                function He(e) {
                  var t = !("wakelock" in (e = e || {})) || e.wakelock;
                  (this.isPolyfilled = !0),
                    (this.displayId = Ge++),
                    (this.displayName = ""),
                    (this.depthNear = 0.01),
                    (this.depthFar = 1e4),
                    (this.isPresenting = !1),
                    Object.defineProperty(this, "isConnected", {
                      get: function () {
                        return (
                          G(
                            "VRDisplay.prototype.isConnected",
                            "VRDisplayCapabilities.prototype.hasExternalDisplay"
                          ),
                          !1
                        );
                      },
                    }),
                    (this.capabilities = new ze({
                      hasPosition: !1,
                      hasOrientation: !1,
                      hasExternalDisplay: !1,
                      canPresent: !1,
                      maxLayers: 1,
                    })),
                    (this.stageParameters = null),
                    (this.waitingForPresent_ = !1),
                    (this.layer_ = null),
                    (this.originalParent_ = null),
                    (this.fullscreenElement_ = null),
                    (this.fullscreenWrapper_ = null),
                    (this.fullscreenElementCachedStyle_ = null),
                    (this.fullscreenEventTarget_ = null),
                    (this.fullscreenChangeHandler_ = null),
                    (this.fullscreenErrorHandler_ = null),
                    t && R() && (this.wakelock_ = new Ne());
                }
                (He.prototype.getFrameData = function (e) {
                  return I(e, this._getPose(), this);
                }),
                  (He.prototype.getPose = function () {
                    return (
                      G(
                        "VRDisplay.prototype.getPose",
                        "VRDisplay.prototype.getFrameData"
                      ),
                      this._getPose()
                    );
                  }),
                  (He.prototype.resetPose = function () {
                    return (
                      G("VRDisplay.prototype.resetPose"), this._resetPose()
                    );
                  }),
                  (He.prototype.getImmediatePose = function () {
                    return (
                      G(
                        "VRDisplay.prototype.getImmediatePose",
                        "VRDisplay.prototype.getFrameData"
                      ),
                      this._getPose()
                    );
                  }),
                  (He.prototype.requestAnimationFrame = function (e) {
                    return Ue(e);
                  }),
                  (He.prototype.cancelAnimationFrame = function (e) {
                    return ke(e);
                  }),
                  (He.prototype.wrapForFullscreen = function (e) {
                    if (h()) return e;
                    if (!this.fullscreenWrapper_) {
                      this.fullscreenWrapper_ = document.createElement("div");
                      var t = [
                        "height: " +
                          Math.min(screen.height, screen.width) +
                          "px !important",
                        "top: 0 !important",
                        "left: 0 !important",
                        "right: 0 !important",
                        "border: 0",
                        "margin: 0",
                        "padding: 0",
                        "z-index: 999999 !important",
                        "position: fixed",
                      ];
                      this.fullscreenWrapper_.setAttribute(
                        "style",
                        t.join("; ") + ";"
                      ),
                        this.fullscreenWrapper_.classList.add(
                          "webvr-polyfill-fullscreen-wrapper"
                        );
                    }
                    if (this.fullscreenElement_ == e)
                      return this.fullscreenWrapper_;
                    if (
                      (this.fullscreenElement_ &&
                        (this.originalParent_
                          ? this.originalParent_.appendChild(
                              this.fullscreenElement_
                            )
                          : this.fullscreenElement_.parentElement.removeChild(
                              this.fullscreenElement_
                            )),
                      (this.fullscreenElement_ = e),
                      (this.originalParent_ = e.parentElement),
                      this.originalParent_ || document.body.appendChild(e),
                      !this.fullscreenWrapper_.parentElement)
                    ) {
                      var i = this.fullscreenElement_.parentElement;
                      i.insertBefore(
                        this.fullscreenWrapper_,
                        this.fullscreenElement_
                      ),
                        i.removeChild(this.fullscreenElement_);
                    }
                    this.fullscreenWrapper_.insertBefore(
                      this.fullscreenElement_,
                      this.fullscreenWrapper_.firstChild
                    ),
                      (this.fullscreenElementCachedStyle_ =
                        this.fullscreenElement_.getAttribute("style"));
                    var r = this;
                    function n() {
                      if (r.fullscreenElement_) {
                        var e = [
                          "position: absolute",
                          "top: 0",
                          "left: 0",
                          "width: " +
                            Math.max(screen.width, screen.height) +
                            "px",
                          "height: " +
                            Math.min(screen.height, screen.width) +
                            "px",
                          "border: 0",
                          "margin: 0",
                          "padding: 0",
                        ];
                        r.fullscreenElement_.setAttribute(
                          "style",
                          e.join("; ") + ";"
                        );
                      }
                    }
                    return n(), this.fullscreenWrapper_;
                  }),
                  (He.prototype.removeFullscreenWrapper = function () {
                    if (this.fullscreenElement_) {
                      var e = this.fullscreenElement_;
                      this.fullscreenElementCachedStyle_
                        ? e.setAttribute(
                            "style",
                            this.fullscreenElementCachedStyle_
                          )
                        : e.removeAttribute("style"),
                        (this.fullscreenElement_ = null),
                        (this.fullscreenElementCachedStyle_ = null);
                      var t = this.fullscreenWrapper_.parentElement;
                      return (
                        this.fullscreenWrapper_.removeChild(e),
                        this.originalParent_ === t
                          ? t.insertBefore(e, this.fullscreenWrapper_)
                          : this.originalParent_ &&
                            this.originalParent_.appendChild(e),
                        t.removeChild(this.fullscreenWrapper_),
                        e
                      );
                    }
                  }),
                  (He.prototype.requestPresent = function (e) {
                    var t = this.isPresenting,
                      i = this;
                    return (
                      e instanceof Array ||
                        (G(
                          "VRDisplay.prototype.requestPresent with non-array argument",
                          "an array of VRLayers as the first argument"
                        ),
                        (e = [e])),
                      new Promise(function (r, n) {
                        if (i.capabilities.canPresent)
                          if (
                            0 == e.length ||
                            e.length > i.capabilities.maxLayers
                          )
                            n(new Error("Invalid number of layers."));
                          else {
                            var s = e[0];
                            if (s.source) {
                              var a = s.leftBounds || Oe,
                                A = s.rightBounds || Qe;
                              if (t) {
                                var o = i.layer_;
                                o.source !== s.source && (o.source = s.source);
                                for (var l = 0; l < 4; l++)
                                  (o.leftBounds[l] = a[l]),
                                    (o.rightBounds[l] = A[l]);
                                return (
                                  i.wrapForFullscreen(i.layer_.source),
                                  i.updatePresent_(),
                                  void r()
                                );
                              }
                              if (
                                ((i.layer_ = {
                                  predistorted: s.predistorted,
                                  source: s.source,
                                  leftBounds: a.slice(0),
                                  rightBounds: A.slice(0),
                                }),
                                (i.waitingForPresent_ = !1),
                                i.layer_ && i.layer_.source)
                              ) {
                                var c = i.wrapForFullscreen(i.layer_.source),
                                  u = function () {
                                    var e = M();
                                    (i.isPresenting = c === e),
                                      i.isPresenting
                                        ? (screen.orientation &&
                                            screen.orientation.lock &&
                                            screen.orientation
                                              .lock("landscape-primary")
                                              .catch(function (e) {
                                                console.error(
                                                  "screen.orientation.lock() failed due to",
                                                  e.message
                                                );
                                              }),
                                          (i.waitingForPresent_ = !1),
                                          i.beginPresent_(),
                                          r())
                                        : (screen.orientation &&
                                            screen.orientation.unlock &&
                                            screen.orientation.unlock(),
                                          i.removeFullscreenWrapper(),
                                          i.disableWakeLock(),
                                          i.endPresent_(),
                                          i.removeFullscreenListeners_()),
                                      i.fireVRDisplayPresentChange_();
                                  },
                                  p = function () {
                                    i.waitingForPresent_ &&
                                      (i.removeFullscreenWrapper(),
                                      i.removeFullscreenListeners_(),
                                      i.disableWakeLock(),
                                      (i.waitingForPresent_ = !1),
                                      (i.isPresenting = !1),
                                      n(new Error("Unable to present.")));
                                  };
                                i.addFullscreenListeners_(c, u, p),
                                  _(c)
                                    ? (i.enableWakeLock(),
                                      (i.waitingForPresent_ = !0))
                                    : (h() || d()) &&
                                      (i.enableWakeLock(),
                                      (i.isPresenting = !0),
                                      i.beginPresent_(),
                                      i.fireVRDisplayPresentChange_(),
                                      r());
                              }
                              i.waitingForPresent_ ||
                                h() ||
                                (D(), n(new Error("Unable to present.")));
                            } else r();
                          }
                        else
                          n(
                            new Error("VRDisplay is not capable of presenting.")
                          );
                      })
                    );
                  }),
                  (He.prototype.exitPresent = function () {
                    var e = this.isPresenting,
                      t = this;
                    return (
                      (this.isPresenting = !1),
                      (this.layer_ = null),
                      this.disableWakeLock(),
                      new Promise(function (i, r) {
                        e
                          ? (!D() &&
                              h() &&
                              (t.endPresent_(),
                              t.fireVRDisplayPresentChange_()),
                            d() &&
                              (t.removeFullscreenWrapper(),
                              t.removeFullscreenListeners_(),
                              t.endPresent_(),
                              t.fireVRDisplayPresentChange_()),
                            i())
                          : r(new Error("Was not presenting to VRDisplay."));
                      })
                    );
                  }),
                  (He.prototype.getLayers = function () {
                    return this.layer_ ? [this.layer_] : [];
                  }),
                  (He.prototype.fireVRDisplayPresentChange_ = function () {
                    var e = new CustomEvent("vrdisplaypresentchange", {
                      detail: { display: this },
                    });
                    window.dispatchEvent(e);
                  }),
                  (He.prototype.fireVRDisplayConnect_ = function () {
                    var e = new CustomEvent("vrdisplayconnect", {
                      detail: { display: this },
                    });
                    window.dispatchEvent(e);
                  }),
                  (He.prototype.addFullscreenListeners_ = function (e, t, i) {
                    this.removeFullscreenListeners_(),
                      (this.fullscreenEventTarget_ = e),
                      (this.fullscreenChangeHandler_ = t),
                      (this.fullscreenErrorHandler_ = i),
                      t &&
                        (document.fullscreenEnabled
                          ? e.addEventListener("fullscreenchange", t, !1)
                          : document.webkitFullscreenEnabled
                          ? e.addEventListener("webkitfullscreenchange", t, !1)
                          : document.mozFullScreenEnabled
                          ? document.addEventListener(
                              "mozfullscreenchange",
                              t,
                              !1
                            )
                          : document.msFullscreenEnabled &&
                            e.addEventListener("msfullscreenchange", t, !1)),
                      i &&
                        (document.fullscreenEnabled
                          ? e.addEventListener("fullscreenerror", i, !1)
                          : document.webkitFullscreenEnabled
                          ? e.addEventListener("webkitfullscreenerror", i, !1)
                          : document.mozFullScreenEnabled
                          ? document.addEventListener(
                              "mozfullscreenerror",
                              i,
                              !1
                            )
                          : document.msFullscreenEnabled &&
                            e.addEventListener("msfullscreenerror", i, !1));
                  }),
                  (He.prototype.removeFullscreenListeners_ = function () {
                    if (this.fullscreenEventTarget_) {
                      var e = this.fullscreenEventTarget_;
                      if (this.fullscreenChangeHandler_) {
                        var t = this.fullscreenChangeHandler_;
                        e.removeEventListener("fullscreenchange", t, !1),
                          e.removeEventListener(
                            "webkitfullscreenchange",
                            t,
                            !1
                          ),
                          document.removeEventListener(
                            "mozfullscreenchange",
                            t,
                            !1
                          ),
                          e.removeEventListener("msfullscreenchange", t, !1);
                      }
                      if (this.fullscreenErrorHandler_) {
                        var i = this.fullscreenErrorHandler_;
                        e.removeEventListener("fullscreenerror", i, !1),
                          e.removeEventListener("webkitfullscreenerror", i, !1),
                          document.removeEventListener(
                            "mozfullscreenerror",
                            i,
                            !1
                          ),
                          e.removeEventListener("msfullscreenerror", i, !1);
                      }
                      (this.fullscreenEventTarget_ = null),
                        (this.fullscreenChangeHandler_ = null),
                        (this.fullscreenErrorHandler_ = null);
                    }
                  }),
                  (He.prototype.enableWakeLock = function () {
                    this.wakelock_ && this.wakelock_.enable();
                  }),
                  (He.prototype.disableWakeLock = function () {
                    this.wakelock_ && this.wakelock_.disable();
                  }),
                  (He.prototype.beginPresent_ = function () {}),
                  (He.prototype.endPresent_ = function () {}),
                  (He.prototype.submitFrame = function (e) {}),
                  (He.prototype.getEyeParameters = function (e) {
                    return null;
                  });
                var We = {
                    ADDITIONAL_VIEWERS: [],
                    DEFAULT_VIEWER: "",
                    MOBILE_WAKE_LOCK: !0,
                    DEBUG: !1,
                    DPDB_URL: "https://dpdb.webvr.rocks/dpdb.json",
                    K_FILTER: 0.98,
                    PREDICTION_TIME_S: 0.04,
                    CARDBOARD_UI_DISABLED: !1,
                    ROTATE_INSTRUCTIONS_DISABLED: !1,
                    YAW_ONLY: !1,
                    BUFFER_SCALE: 0.5,
                    DIRTY_SUBMIT_FRAME_BINDINGS: !1,
                  },
                  Xe = { LEFT: "left", RIGHT: "right" };
                function Ye(e) {
                  var t = S({}, We);
                  (e = S(t, e || {})),
                    He.call(this, { wakelock: e.MOBILE_WAKE_LOCK }),
                    (this.config = e),
                    (this.displayName = "Cardboard VRDisplay"),
                    (this.capabilities = new ze({
                      hasPosition: !1,
                      hasOrientation: !0,
                      hasExternalDisplay: !1,
                      canPresent: !0,
                      maxLayers: 1,
                    })),
                    (this.stageParameters = null),
                    (this.bufferScale_ = this.config.BUFFER_SCALE),
                    (this.poseSensor_ = new Te(this.config)),
                    (this.distorter_ = null),
                    (this.cardboardUI_ = null),
                    (this.dpdb_ = new ge(
                      this.config.DPDB_URL,
                      this.onDeviceParamsUpdated_.bind(this)
                    )),
                    (this.deviceInfo_ = new pe(
                      this.dpdb_.getDeviceParams(),
                      e.ADDITIONAL_VIEWERS
                    )),
                    (this.viewerSelector_ = new xe(e.DEFAULT_VIEWER)),
                    this.viewerSelector_.onChange(
                      this.onViewerChanged_.bind(this)
                    ),
                    this.deviceInfo_.setViewer(
                      this.viewerSelector_.getCurrentViewer()
                    ),
                    this.config.ROTATE_INSTRUCTIONS_DISABLED ||
                      (this.rotateInstructions_ = new Re()),
                    h() &&
                      window.addEventListener(
                        "resize",
                        this.onResize_.bind(this)
                      );
                }
                return (
                  (Ye.prototype = Object.create(He.prototype)),
                  (Ye.prototype._getPose = function () {
                    return {
                      position: null,
                      orientation: this.poseSensor_.getOrientation(),
                      linearVelocity: null,
                      linearAcceleration: null,
                      angularVelocity: null,
                      angularAcceleration: null,
                    };
                  }),
                  (Ye.prototype._resetPose = function () {
                    this.poseSensor_.resetPose && this.poseSensor_.resetPose();
                  }),
                  (Ye.prototype._getFieldOfView = function (e) {
                    var t;
                    if (e == Xe.LEFT)
                      t = this.deviceInfo_.getFieldOfViewLeftEye();
                    else {
                      if (e != Xe.RIGHT)
                        return (
                          console.error("Invalid eye provided: %s", e), null
                        );
                      t = this.deviceInfo_.getFieldOfViewRightEye();
                    }
                    return t;
                  }),
                  (Ye.prototype._getEyeOffset = function (e) {
                    var t;
                    if (e == Xe.LEFT)
                      t = [
                        0.5 * -this.deviceInfo_.viewer.interLensDistance,
                        0,
                        0,
                      ];
                    else {
                      if (e != Xe.RIGHT)
                        return (
                          console.error("Invalid eye provided: %s", e), null
                        );
                      t = [
                        0.5 * this.deviceInfo_.viewer.interLensDistance,
                        0,
                        0,
                      ];
                    }
                    return t;
                  }),
                  (Ye.prototype.getEyeParameters = function (e) {
                    var t = this._getEyeOffset(e),
                      i = this._getFieldOfView(e),
                      r = {
                        offset: t,
                        renderWidth:
                          0.5 *
                          this.deviceInfo_.device.width *
                          this.bufferScale_,
                        renderHeight:
                          this.deviceInfo_.device.height * this.bufferScale_,
                      };
                    return (
                      Object.defineProperty(r, "fieldOfView", {
                        enumerable: !0,
                        get: function () {
                          return (
                            G(
                              "VRFieldOfView",
                              "VRFrameData's projection matrices"
                            ),
                            i
                          );
                        },
                      }),
                      r
                    );
                  }),
                  (Ye.prototype.onDeviceParamsUpdated_ = function (e) {
                    this.config.DEBUG &&
                      console.log(
                        "DPDB reported that device params were updated."
                      ),
                      this.deviceInfo_.updateDeviceParams(e),
                      this.distorter_ &&
                        this.distorter_.updateDeviceInfo(this.deviceInfo_);
                  }),
                  (Ye.prototype.updateBounds_ = function () {
                    this.layer_ &&
                      this.distorter_ &&
                      (this.layer_.leftBounds || this.layer_.rightBounds) &&
                      this.distorter_.setTextureBounds(
                        this.layer_.leftBounds,
                        this.layer_.rightBounds
                      );
                  }),
                  (Ye.prototype.beginPresent_ = function () {
                    var e = this.layer_.source.getContext("webgl");
                    e ||
                      (e = this.layer_.source.getContext("experimental-webgl")),
                      e || (e = this.layer_.source.getContext("webgl2")),
                      e &&
                        (this.layer_.predistorted
                          ? this.config.CARDBOARD_UI_DISABLED ||
                            ((e.canvas.width = E() * this.bufferScale_),
                            (e.canvas.height = b() * this.bufferScale_),
                            (this.cardboardUI_ = new te(e)))
                          : (this.config.CARDBOARD_UI_DISABLED ||
                              (this.cardboardUI_ = new te(e)),
                            (this.distorter_ = new V(
                              e,
                              this.cardboardUI_,
                              this.config.BUFFER_SCALE,
                              this.config.DIRTY_SUBMIT_FRAME_BINDINGS
                            )),
                            this.distorter_.updateDeviceInfo(this.deviceInfo_)),
                        this.cardboardUI_ &&
                          this.cardboardUI_.listen(
                            function (e) {
                              this.viewerSelector_.show(
                                this.layer_.source.parentElement
                              ),
                                e.stopPropagation(),
                                e.preventDefault();
                            }.bind(this),
                            function (e) {
                              this.exitPresent(),
                                e.stopPropagation(),
                                e.preventDefault();
                            }.bind(this)
                          ),
                        this.rotateInstructions_ &&
                          (w() && R()
                            ? this.rotateInstructions_.showTemporarily(
                                3e3,
                                this.layer_.source.parentElement
                              )
                            : this.rotateInstructions_.update()),
                        (this.orientationHandler =
                          this.onOrientationChange_.bind(this)),
                        window.addEventListener(
                          "orientationchange",
                          this.orientationHandler
                        ),
                        (this.vrdisplaypresentchangeHandler =
                          this.updateBounds_.bind(this)),
                        window.addEventListener(
                          "vrdisplaypresentchange",
                          this.vrdisplaypresentchangeHandler
                        ),
                        this.fireVRDisplayDeviceParamsChange_());
                  }),
                  (Ye.prototype.endPresent_ = function () {
                    this.distorter_ &&
                      (this.distorter_.destroy(), (this.distorter_ = null)),
                      this.cardboardUI_ &&
                        (this.cardboardUI_.destroy(),
                        (this.cardboardUI_ = null)),
                      this.rotateInstructions_ &&
                        this.rotateInstructions_.hide(),
                      this.viewerSelector_.hide(),
                      window.removeEventListener(
                        "orientationchange",
                        this.orientationHandler
                      ),
                      window.removeEventListener(
                        "vrdisplaypresentchange",
                        this.vrdisplaypresentchangeHandler
                      );
                  }),
                  (Ye.prototype.updatePresent_ = function () {
                    this.endPresent_(), this.beginPresent_();
                  }),
                  (Ye.prototype.submitFrame = function (e) {
                    if (this.distorter_)
                      this.updateBounds_(), this.distorter_.submitFrame();
                    else if (this.cardboardUI_ && this.layer_) {
                      var t = this.layer_.source.getContext("webgl");
                      t ||
                        (t =
                          this.layer_.source.getContext("experimental-webgl")),
                        t || (t = this.layer_.source.getContext("webgl2"));
                      var i = t.canvas;
                      (i.width == this.lastWidth &&
                        i.height == this.lastHeight) ||
                        this.cardboardUI_.onResize(),
                        (this.lastWidth = i.width),
                        (this.lastHeight = i.height),
                        this.cardboardUI_.render();
                    }
                  }),
                  (Ye.prototype.onOrientationChange_ = function (e) {
                    this.viewerSelector_.hide(),
                      this.rotateInstructions_ &&
                        this.rotateInstructions_.update(),
                      this.onResize_();
                  }),
                  (Ye.prototype.onResize_ = function (e) {
                    if (this.layer_) {
                      var t = this.layer_.source.getContext("webgl");
                      t ||
                        (t =
                          this.layer_.source.getContext("experimental-webgl")),
                        t || (t = this.layer_.source.getContext("webgl2"));
                      var i = [
                        "position: absolute",
                        "top: 0",
                        "left: 0",
                        "width: 100vw",
                        "height: 100vh",
                        "border: 0",
                        "margin: 0",
                        "padding: 0px",
                        "box-sizing: content-box",
                      ];
                      t.canvas.setAttribute("style", i.join("; ") + ";"),
                        C(t.canvas);
                    }
                  }),
                  (Ye.prototype.onViewerChanged_ = function (e) {
                    this.deviceInfo_.setViewer(e),
                      this.distorter_ &&
                        this.distorter_.updateDeviceInfo(this.deviceInfo_),
                      this.fireVRDisplayDeviceParamsChange_();
                  }),
                  (Ye.prototype.fireVRDisplayDeviceParamsChange_ = function () {
                    var e = new CustomEvent("vrdisplaydeviceparamschange", {
                      detail: { vrdisplay: this, deviceInfo: this.deviceInfo_ },
                    });
                    window.dispatchEvent(e);
                  }),
                  (Ye.VRFrameData = Ve),
                  (Ye.VRDisplay = He),
                  Ye
                );
              });
            })
          ),
          o = "0.10.12",
          l = {
            ADDITIONAL_VIEWERS: [],
            DEFAULT_VIEWER: "",
            PROVIDE_MOBILE_VRDISPLAY: !0,
            MOBILE_WAKE_LOCK: !0,
            DEBUG: !1,
            DPDB_URL: "https://dpdb.webvr.rocks/dpdb.json",
            K_FILTER: 0.98,
            PREDICTION_TIME_S: 0.04,
            CARDBOARD_UI_DISABLED: !1,
            ROTATE_INSTRUCTIONS_DISABLED: !1,
            YAW_ONLY: !1,
            BUFFER_SCALE: 0.5,
            DIRTY_SUBMIT_FRAME_BINDINGS: !1,
          };
        function c(e) {
          (this.config = a(a({}, l), e)),
            (this.polyfillDisplays = []),
            (this.enabled = !1),
            (this.hasNative = "getVRDisplays" in navigator),
            (this.native = {}),
            (this.native.getVRDisplays = navigator.getVRDisplays),
            (this.native.VRFrameData = window.VRFrameData),
            (this.native.VRDisplay = window.VRDisplay),
            (!this.hasNative ||
              (this.config.PROVIDE_MOBILE_VRDISPLAY && n())) &&
              (this.enable(),
              this.getVRDisplays().then(function (e) {
                e &&
                  e[0] &&
                  e[0].fireVRDisplayConnect_ &&
                  e[0].fireVRDisplayConnect_();
              }));
        }
        (c.prototype.getPolyfillDisplays = function () {
          if (this._polyfillDisplaysPopulated) return this.polyfillDisplays;
          if (n()) {
            var e = new A({
              ADDITIONAL_VIEWERS: this.config.ADDITIONAL_VIEWERS,
              DEFAULT_VIEWER: this.config.DEFAULT_VIEWER,
              MOBILE_WAKE_LOCK: this.config.MOBILE_WAKE_LOCK,
              DEBUG: this.config.DEBUG,
              DPDB_URL: this.config.DPDB_URL,
              CARDBOARD_UI_DISABLED: this.config.CARDBOARD_UI_DISABLED,
              K_FILTER: this.config.K_FILTER,
              PREDICTION_TIME_S: this.config.PREDICTION_TIME_S,
              ROTATE_INSTRUCTIONS_DISABLED:
                this.config.ROTATE_INSTRUCTIONS_DISABLED,
              YAW_ONLY: this.config.YAW_ONLY,
              BUFFER_SCALE: this.config.BUFFER_SCALE,
              DIRTY_SUBMIT_FRAME_BINDINGS:
                this.config.DIRTY_SUBMIT_FRAME_BINDINGS,
            });
            this.polyfillDisplays.push(e);
          }
          return (this._polyfillDisplaysPopulated = !0), this.polyfillDisplays;
        }),
          (c.prototype.enable = function () {
            if (
              ((this.enabled = !0), this.hasNative && this.native.VRFrameData)
            ) {
              var e = this.native.VRFrameData,
                t = new this.native.VRFrameData(),
                i = this.native.VRDisplay.prototype.getFrameData;
              window.VRDisplay.prototype.getFrameData = function (r) {
                r instanceof e
                  ? i.call(this, r)
                  : (i.call(this, t),
                    (r.pose = t.pose),
                    s(t.leftProjectionMatrix, r.leftProjectionMatrix),
                    s(t.rightProjectionMatrix, r.rightProjectionMatrix),
                    s(t.leftViewMatrix, r.leftViewMatrix),
                    s(t.rightViewMatrix, r.rightViewMatrix));
              };
            }
            (navigator.getVRDisplays = this.getVRDisplays.bind(this)),
              (window.VRDisplay = A.VRDisplay),
              (window.VRFrameData = A.VRFrameData);
          }),
          (c.prototype.getVRDisplays = function () {
            var e = this;
            return (
              this.config,
              this.hasNative
                ? this.native.getVRDisplays.call(navigator).then(function (t) {
                    return t.length > 0 ? t : e.getPolyfillDisplays();
                  })
                : Promise.resolve(this.getPolyfillDisplays())
            );
          }),
          (c.version = o),
          (c.VRFrameData = A.VRFrameData),
          (c.VRDisplay = A.VRDisplay);
        var h = Object.freeze({ default: c }),
          d = (h && c) || h;
        return (
          void 0 !== e &&
            e.window &&
            (e.document || (e.document = e.window.document),
            e.navigator || (e.navigator = e.window.navigator)),
          d
        );
      })();
    },
  },
]);
